This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/35158] g++ does not compile valid C++ for loops with -fopenmp
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Aug 2008 21:46:44 -0000
- Subject: [Bug c++/35158] g++ does not compile valid C++ for loops with -fopenmp
- References: <bug-35158-9293@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from jakub at gcc dot gnu dot org 2008-08-10 21:46 -------
This is invalid OpenMP code.
See 2.5.1 (in OpenMP 3.0, similar wording is in 2.5 standard too):
init-expr One of the following:
var = lb
integer-type var = lb
random-access-iterator-type var = lb
pointer-type var = lb
Therefore int i(0) isn't valid init-expr. Having separate diagnostics for it
rather than just reporting a generic parse error might make some sense though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35158