This is the mail archive of the 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, Sebastian Pop wrote:

> The following patch registers a set of functions for parsing the
> OpenMP directives.  Most of the functions are not yet implemented, but
> I wanted to get some feed-back from the CPP people on whether this is
> the right approach for parsing the directives.

Has there been any discussion - on the main public GCC lists - of the 

The approach in this patch seems reasonable in principle, but the patch 
doesn't include any of the hard parts, such as the directives involving 
expressions, and those that have effects on the handling of a subsequent 
statement and restrict its form.  I don't think at present you'll easily 
get a single directive parser working for both C and C++, though you may 
be able to unify handling after parsing.

The diagnostics in the patch do not follow the GNU Coding Standards, 
section 4.3, which describes how diagnostics are formatted.  In particular 

   The string message should not begin with a capital letter when it
   follows a program name and/or file name, because that isn't the
   beginning of a sentence. (The sentence conceptually starts at the
   beginning of the line.) Also, it should not end with a period.

For this to go on mainline there should be testcases covering every 
diagnostic, every conditional in the implementation and every constraint 
in the OpenMP standard - for both C and C++ as far as the implementations 
differ.  I strongly recommend adding testcases from the beginning.  Of 
course there also need to be execution tests of all OpenMP constructs as 
well.  Similarly, maintain a section of extend.texi discussing the state 
of OpenMP support from the beginning, and update it as the support 

Joseph S. Myers      (personal mail) (CodeSourcery mail) (Bugzilla assignments and CCs)

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