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]
Other format: [Raw text]

RE: a nifty feature for c preprocessor


> i don't know if you're trying to be funny...
> 
> but what's between the definition of N1 and the undef of A may be a very
> complex. it's just simplified for demonstration.

It's not good programming practice to have a macro (in this case A) have
two different values, with an #undef between then.    There are very
few good reasons to use #undef, but that's not one of them.

The reason is that when you look at the usage of the macro and want to
find how it's defined, a search for the definition may come up with the
wrong one.


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