This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp] C++ #pragma omp for and -fno-for-scope
- From: Richard Henderson <rth at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Diego Novillo <dnovillo at redhat dot com>, gcc at gcc dot gnu dot org
- Date: Tue, 25 Oct 2005 13:59:52 -0700
- Subject: Re: [gomp] C++ #pragma omp for and -fno-for-scope
- References: <20051025185654.GF16034@devserv.devel.redhat.com>
On Tue, Oct 25, 2005 at 02:56:54PM -0400, Jakub Jelinek wrote:
> So my question is, should we consider #pragma omp for and
> #pragma omp parallel for a separate scope around the for loop for
> this kind of purpose or not? I think it would be better to be
> consistent with -fno-openmp (i.e. if there is a declaration
> in the for loop, move the DECL_EXPR right before the loop, either
> into a separate sk_for scope if flag_new_for_scope > 0, or just into
> the parent scope at that point) and create sk_omp scope for the
> rest of the construct.
>
> What do you think?
I think that's too much work to cater to pre-ISO C++. If you like,
print a warning message when the decl is present and -fno-for-scope
has been used. Something like
"-fno-for-scope ignored with #pragma omp for"
r~