Preprocessor bug

Martin Sebor sebor@roguewave.com
Wed Nov 22 09:52:00 GMT 2000


Alexandre Oliva wrote:
> 
> On Nov 21, 2000, Neil Booth <neilb@earthling.net> wrote:
> 
> > I'd be interested in what others think, though.
> 
> At the very least, we should print a warning message that explains why
> the nested replacement isn't taking place, to avoid getting multiple
> bug reports about a non-issue.

Unless you are willing to disregard existing practice I do encourage you
to discuss this with other implementers before deciding that gcc's
behavior conforms. I checked with EDG, for instance, and they don't
believe that Neil's interpretation is correct: their understanding is
that macro references get expanded in already expanded macros except
when the latter is the name of the macro under expansion itself. If
you're interested, I can poll a few other vendors to get a more
representative sample, although I fully expect them to take the same
position as EDG.

As for the warning (irrespective of the subject), I posted a couple of
emails and filed bug reports (see, for instance, c++/708) previously: I
don't believe that the compiler should issue a diagnostic for conforming
code. It makes writing portable, warning-free, code difficult.

Regards
Martin

> 
> --
> Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
> CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
> Free Software Evangelist    *Please* write to mailing lists, not to me


More information about the Gcc-bugs mailing list