This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ Patch] PR 4093
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Stan Shebs <shebs at apple dot com>, Richard Henderson <rth at redhat dot com>,Jason Merrill <jason at redhat dot com>,Craig Rodrigues <rodrigc at attbi dot com>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 3 Mar 2002 18:14:35 +0000
- Subject: Re: [C++ Patch] PR 4093
- References: <20020301232013.GB14238@daikokuya.demon.co.uk> <70040000.1015043131@warlock.codesourcery.com>
Mark Mitchell wrote:-
> The big advantage is that a C parser is (close to) free, once you have
> a C++ parser. So, you can share a whole lot of code.
How would you do this? With a bunch of #ifdefs, or a bunch of if (lang
== C)?
> There are also extensions, like attributes, for which it is easy to get
> subtly different implementation; having one parser means you at least
> get it consistently wrong everywhere. :-)
Agreed - attributes are a real mess. I think you tightened up g++'s
grammar here, and I _think_ gcc's grammar is still looser; that might
be an issue.
Neil.