I use autotools to manage my CPP project. When compiling my code, gcc has the following flags:-Wall -Werror
So, when there is a warning in my code, gcc will treat it as an error, compilation will be aborted.
My project also includes antlr3, which generate multiple files. The generated files contain several warnings that interrupt compilation.
error: unused variable ‘index21_49’
in CongerCQLLexer.c, line 20589, column 24
20587> ANTLR3_UINT32 LA21_49;
20588>
20589> ANTLR3_MARKER index21_49;
20590>
20591>
error: unused variable ‘index21_131’
in CongerCQLLexer.c, line 20622, column 24
20620> ANTLR3_UINT32 LA21_131;
20621>
20622> ANTLR3_MARKER index21_131;
20623>
20624>
I want to know how to disable warnings for generated files? thank.
source
share