[antlr-interest] [C Runtime] Redefinition issue in antlr3convertutf.h

Gonzague Reydet gonzague.reydet at gmail.com
Sun Nov 20 23:28:55 PST 2011


Hi all,

Using the ANLTR C runtime v3.4, I encounter a redefinition error of "false"
and "true" values in antlr3convertutf.h at compile time when including the
antlr3.h file in my code.

IMO we should have a verification to check if those flags are already
defined or not before defining them in the antlr3convertutf.h file.
Something like the following code should fix my compiling issue :

#ifndef    true
#define true ANTLR3_TRUE
#endif

#ifndef    false
#define false ANTLR3_FALSE
#endif

Is there any reason for not doing this check here? Is this a known issue?
Moreover I not sure this is the right place to define such generic flags...
Why do you need to define them here?

Regards,
Gonzague


More information about the antlr-interest mailing list