[antlr-interest] g++ compiler warnings on the generated lexer and parser .c files

Ruslan Zasukhin ruslan_zasukhin at valentina-db.com
Sun Sep 11 11:12:42 PDT 2011


On 11/10/10 7:34 PM, "Jim Idle" <jimi at temporal-wave.com> wrote:

> You probably need to suppress the warnings for that. The compiler will get rid
> of them anyway. I thought that this was already done in the generated header
> but perhaps a different pragma is required if compiling as C++.


I also now take a look on how to fix warns for XCODE/GCC

In the Lexer.h present only WIN - visual disables


#ifdef    ANTLR3_WINDOWS
#pragma warning( disable : 4100 )
#pragma warning( disable : 4101 )
#pragma warning( disable : 4127 )
#pragma warning( disable : 4189 )
#pragma warning( disable : 4505 )
#pragma warning( disable : 4701 )
#endif


For GCC I try this, but so far no effect :(

#pragma GCC diagnostic ignored "-Wunused-label"
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-value"



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the antlr-interest mailing list