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

Joel Yliluoma <bisqwit at iki dot fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[C++0x] Returns from lambda |[OpenMP & C++0x]: Compiler
                   |functions incorrectly       |error when lambda-function
                   |detected as "exits" from    |within OpenMP loop
                   |OpenMP loops in surrounding |
                   |code                        |

--- Comment #1 from Joel Yliluoma <bisqwit at iki dot fi> 2011-05-19 08:05:26 
UTC ---
It also happens if the lambda-function does not explicitly contain the "return"
statement.

For example, this code triggers the same error.

int main()
{
    #pragma omp parallel for
    for(int a=0; a<10; ++a)
    {
        auto func = [] () -> void { };
        func();
    }
}

Reply via email to