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.owill 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 2010IBM XL C for AIX ---- Version 11.1.0.0 Thu Sep 24 16:44:09 EDT 2010 main My copyright .file tt.c .text .data .bss .main _$STATIC _$STATIC main main Thu Sep 24 16:44:25 2010 IBM XL C for AIX, Version 11.1.0.0 ---