This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

0-defined vs. 1-defined preprocessor symbols


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]