This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/35158] g++ does not compile valid C++ for loops with -fopenmp



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]