PR 35158 g++ does not compile valid C++ for loops with -fopenmp

Manuel López-Ibáñez lopezibanez@gmail.com
Thu Aug 7 09:50:00 GMT 2008


The following patch correctly diagnoses the use of parenthesized
initializers in a OpenMP for loop, which seems to be not allowed by
the standard.
Instead of a cascade of useless errors, it prints the reason to not
accept the code and what it expects.

Bootstrapped and regression tested on x86_64-pc-linux-gnu wit
--enable-languages=all.

OK for trunk?

2008-08-07  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

  PR c++/35158
cp/
  * parser.c (cp_parser_omp_for_loop): Handle parenthesized initializers.
testsuite/
  * g++.dg/gomp/pr35158.C: New.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fix-pr35158.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080807/975ba002/attachment.ksh>


More information about the Gcc-patches mailing list