This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Implementing OpenMP pragmas for the C front end
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: Steven Bosscher <s dot bosscher at student dot tudelft dot nl>
- Cc: gcc at gcc dot gnu dot org, OpenMP for GCC project <gomp-discuss at nongnu dot org>
- Date: Fri, 7 Feb 2003 22:18:47 +0000
- Subject: Re: Implementing OpenMP pragmas for the C front end
- References: <1044655909.800.139.camel@steven>
Steven Bosscher wrote:-
> GCC right now only has pragmas that do not put restrictions on the
> language elements surrounding the pragmas. AFAICT most pragmas have
> their effect over the whole translation unit.
Right. Really, for things like expressions (possibly functions,
depending on your IR) that are affected by C99 pragmas, there really
needs to be bits on their representation that gives the state of said
pragmas at that time in the soure file. It isn't hard to do I think.
> ----------
> /* ERROR - The flush directive cannot be the immediate
> * substatement of an if statement. */
> if (x!=0)
> #pragma omp flush (x)
Surely not. I think this is a *really really* bad idea; I wouldn't
support it going into GCC. It's simply not the way C and C++ work.
> if (x!=0)
> {
> #pragma omp flush (x)
> }
Ugh. Which @#$&*( thought of this?
Neil.