Places a comment into the object module.
>>-#--pragma--comment-------------------------------------------> >--(--+-compiler-----------------------------------+--)-------->< +-date---------------------------------------+ +-timestamp----------------------------------+ '-+-copyright-+--+-------------------------+-' '-user------' '-,--"--token_sequence--"-'
More than one comment directive can appear in a translation unit, and each type of comment directive can appear more than once, with the exception of copyright, which can appear only once.
You can display the object-file comments by using the operating system strings command.
#pragma comment(date)
#pragma comment(compiler)
#pragma comment(timestamp)
#pragma comment(copyright,"My copyright")
int main() { return 0; }
xlc -c tt.c
strings -a tt.o
will cause the comment information embedded
in tt.o to be displayed, along with any other strings
that may be found in tt.o. For example, assuming
the program code shown above: @.text
.data
@.bss
.comment
Thu Sep 24 16:44:25 EDT 2014IBM XL C for AIX ---- Version 13.1.0.0
Thu Sep 24 16:44:09 EDT 2014
main
My copyright
.file
tt.c
.text
.data
.bss
.main
_$STATIC
_$STATIC
main
main
Thu Sep 24 16:44:25 2014
IBM XL C for AIX, Version 13.1.0.0 ---