Identifier Length ???

Ingo Krabbe ikrabbe@earthling.net
Tue Jul 3 09:02:00 GMT 2001


On 3 Jul 2001, Aparna  Ranish wrote:

> Hi
>      Can somebody tell me the maximum length of identifier in GCC ?
> It looks as if there is no restriction on the length...
>
>
> Thanx and regards
> Aparna Ranish
Identifiers are handled by an internal tree structure by gcc. The info
pages say about IDENTIFIER_NODE that keeps an IDENTIFIER_POINTER to a
NUL-terminated char* and an IDENTIFIER_LENGTH, which is the same as
strlen(IDENTIFIER_POINTER(x)). This means that you will have the largest
array which your system provides as the maximum length for an identifier.
Since you will not have much room for saving some data in the identifier
if you hav such a long name the real upper border for indentifier lengths
is some orders smaller.

Does ISO/ANSI has something to say about that topic ?

CU INGO




More information about the Gcc-help mailing list