[C++ Patch] PR 4093
Neil Booth
neil@daikokuya.demon.co.uk
Sun Mar 3 10:14:00 GMT 2002
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.
More information about the Gcc-patches
mailing list