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++/24513] [gomp] Parsing problems with OpenMP directives inside member functions



------- Comment #3 from martin at mpa-garching dot mpg dot de  2005-10-25 11:26 -------
This patch appears to work very well, thanks!

However, later in my code I run into a problem of the following sort:
The (patched) compiler rejects the following code

void bar (int *p)
    {
#pragma omp parallel for
    for (int m=0; m<1000; ++m)
      {
      switch(p[m])
        {
        case 1:
          p[m]=2;
          break;
        }
      }
    }

~/tmp>g++ -fopenmp -c test.cc
test.cc: In function 'void bar(int*)':
test.cc:10: error: break statement used with OpenMP for loop

Is this really ill-formed code? It is accepted by all other compilers I tested.

I can open another bug report for this, but I'd like to make sure first that
this is not a consequence of the proposed patch.


-- 


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


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