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: [gomp] parse OpenMP directives


On Wed, 13 Oct 2004, Paolo Bonzini wrote:

> Add "incrementally" before write, and that will reflect my "design" (I was not
> trying to suggest a design).

As long as you do suggest one before any implementation!  (GCC suffers 
from too much done without design.  Experimentation and prototyping is 
needed, but so is design.)

> > * Better error recovery and more accurate diagnostic location.
> 
> This is not going to happen at once.  See the C++ parser for examples.

Indeed, it was listed under Benefits not Requirements.  But writing many 
tests upfront for error recovery (though only fixing them once the new 
parser is working and in use) could help.

> > * Could the C++ parser be adapted?  (The principles of minimal incremental
> > changes mean that if the aim is to replace a parser then larger replacements
> > such as "merge C and C++ front ends" don't need considering as alternatives,
> > but a parser replacement could be considered as one incremental change
> > towards such a merge, depending on the design adopted.)
> 
> This way was estimated to be around 2-3 man years by Mark Mitchell, though it
> may be considered The Only Right Way To Do It.

And Geoffrey Keating estimated 6-9 man years for a C/C++ front end merge 
with no adverse effects on language dialects supported or performance.

By comparison, C - even GNU C - is *much* simpler to parse than C++, and a 
few weeks to a few months should be sufficient to replace a C parser (and 
no other components at the same time).

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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