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

--- Comment #2 from Joel Yliluoma <bisqwit at iki dot fi> 2011-05-19 08:10:06 
UTC ---
Even if the lambda function is not called, it happens. Merely defining the
function causes it.
Interestingly though, it does not happen if a method body is defined within the
loop. The code below does not cause the error. So it is restricted to lambda
function bodies.
It also does not happen when calling lambda functions that are defined outside
the loop.

int main()
{
    #pragma omp parallel for
    for(int a=0; a<10; ++a)
    {
        struct tmp
        {
            static int test() { return 0; }
        };
    }
}

Reply via email to