[Bug c/52600] New: OpenMP: declaration as structured block

burnus at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 16 11:04:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52600

             Bug #: 52600
           Summary: OpenMP: declaration as structured block
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Keywords: openmp, rejects-valid
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org


Found at
http://openmp.org/forum/viewtopic.php?f=10&t=1329&sid=58cf62c9cbfc7fee81768f053e079615

... and there believed to be valid. GCC rejects the following:

    #pragma omp task
    int x = foo();

with
  error: expected expression before ‘int’

While the following, syntactically identical (?), is accepted:

  #pragma omp task
  { int x = foo(); }



More information about the Gcc-bugs mailing list