This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp] parse OpenMP directives
- From: "Joseph S. Myers" <jsm at polyomino dot org dot uk>
- To: Sebastian Pop <sebastian dot pop at cri dot ensmp dot fr>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Oct 2004 10:40:02 +0000 (UTC)
- Subject: Re: [gomp] parse OpenMP directives
- References: <20041013090100.GA2294@cri.ensmp.fr>
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
design?
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
note:
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
improves.
--
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)