This is the mail archive of the gcc-patches@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: [C++ Patch] PR 4093


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.


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