[antlr-interest] [C] Warnings on old gcc version

Gonzague Reydet gonzague.reydet at gmail.com
Thu Dec 8 00:10:57 PST 2011


Hi all,

When I compile my project that depends on Antlr headers with an old version
of GCC (3.4.5 20051201 (Red Hat 3.4.5-2)), I encounter the following
warning :

In file included from
../../..//antlrLib/32/include/antlr3baserecognizer.h:44,
                 from ../../..//antlrLib/32/include/antlr3cyclicdfa.h:38,
                 from ../../..//antlrLib/32/include/antlr3.h:40,
                 from ../../..//h/myHeader.h:27,
                 from myFile.c:47:
../../..//antlrLib/32/include/antlr3commontreenodestream.h:293: warning:
declaration of 'index' shadows a global declaration
/usr/include/string.h:304: warning: shadowed declaration is here

The same warnings also occur in the following file :
- antlr3intstream.h:177
- antlr3commontoken.h:293
- antlr3commontoken.h:301

In future versions of Antlr, should it be possible to rename the
corresponding function parameters so we can build without warning on such
old GCC?
This issue does not show up in more recent version of GCC like the
following : GCC 4.1.2 20080704 (Red Hat 4.1.2-46)

Regards
Gonzague


More information about the antlr-interest mailing list