This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
0-defined vs. 1-defined preprocessor symbols
- To: gcc at gcc dot gnu dot org
- Subject: 0-defined vs. 1-defined preprocessor symbols
- From: "Jose M. Moya" <jmmoya at inf-cr dot uclm dot es>
- Date: Mon, 5 Mar 2001 14:39:28 +0100
I find it terribly annoying that defining a preprocessor symbol to
zero is not the same as not defining it. And sometimes, defining it
to zero is equivalent to define it to 1.
I know it is documented, but I think it may be misleading. Would you
accept patches to change
#ifdef SYMBOL
...
#endif
into
#ifdef SYMBOL
if (SYMBOL)
{
...
}
#endif
??
In case this is a good thing, should I send one patch for each file?
one patch for each preprocessor symbol? one huge patch for
everything?
thanks and regards,
josem