https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100661
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Can lambdas appear inside #pragma omp in C++? The following is accepted but each thread seems to get the global 'c', but at least we don't ICE (possibly because frame lowering is done in the FE). void foo (char **x) { #pragma omp parallel for for (int i = 0; i < 16; i++) { char c[50]; __builtin_strcpy (c, x[i]); auto x = [&] () { __builtin_strcat (c, "foo"); }; x(); } }