Operating System - OpenVMS
1756339 Members
2629 Online
108846 Solutions
New Discussion

Re: C compiler on Itanium

 
Malleka Ramachandran
Frequent Advisor

C compiler on Itanium

I noticed that the C compiler (HP C V7.2-001-50G14) does not produce a warning when the identifier length exceeds 31 characters but simply truncates it. When I link I get an undefined symbol warning.
Is there a compiler option that I need to use to get this warning?

Thanks,
Malleka
1 REPLY 1
Steven Schweda
Honored Contributor

Re: C compiler on Itanium

HELP CC /NAMES

What sort of identifier? It (different
version) seems to work as documented for me:

td183 $ type LONG.C
#include

extern int external_name_longer_than_thirty_one_characters;

main()
{
int local_name_longer_than_thirty_one_characters = 1;

printf( " ext = %d.\n", external_name_longer_than_thirty_one_characters);
printf( " loc = %d.\n", local_name_longer_than_thirty_one_characters);
}

td183 $ cc LONG.C

extern int external_name_longer_than_thirty_one_characters;
...........^
%CC-W-LONGEXTERN, The external identifier name exceeds 31 characters; truncated
to "EXTERNAL_NAME_LONGER_THAN_THIRT".
at line number 3 in file USER1:[ANTINODE]LONG.C;3

td183 $ cc /version
HP C V7.2-001 on OpenVMS IA64 V8.2-1


Perhaps you could supply a (small) _failing_
test case. (Or run this one through your
compiler.)