This is the mail archive of the
mailing list for the GCC project.
RE: a nifty feature for c preprocessor
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: ren_zokuken01 at hotmail dot com
- Cc: dewar at adacore dot com, gcc at gcc dot gnu dot org
- Date: Sun, 01 Jan 2012 07:40:27 EST
- Subject: RE: a nifty feature for c preprocessor
- References: <BLU163-W342C12D3ED2E4138C6E37383AE0@phx.gbl>,<BLU163-W112D62C836C94E7A8E14BE83AE0@phx.gbl>,<BLU163-W101189B8A57201E7156C4B83AC0@phx.gbl>,<BLU163-W25C240E42C4F005C6EC8D483AC0@phx.gbl>,<4EFAE808.email@example.com>,<BLU163-W303D03E552FD7FE2F570BE83AC0@phx.gbl>,<4EFB9A8E.firstname.lastname@example.org>,<BLU163-W5AFB44552B05762B858C183AC0@phx.gbl>,<4EFC39E0.email@example.com>,<BLU163-W33EF3A335E22C77A2F06F883AD0@phx.gbl>,<20111229213714.3BFED33C83@vlsi1.gnat.com>,<BLU163-W10EEE0C95722F5A6ED284083AD0@phx.gbl>,<20111229231852.16ABB33C83@vlsi1.gnat.com> <BLU163-W631C380362A632A3AD381C83930@phx.gbl>,<4EFFF238.firstname.lastname@example.org> <BLU163-W52DACC0B2E1B7F0406408883900@phx.gbl>
> 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