https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70735
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Component|libstdc++ |c++ Assignee|redi at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- Although that change just makes a latent bug apparent, this doesn't use std::function and still fails the same way: extern "C" int printf(const char*, ...); int main() { static int a; void(*f)(int) = [](auto) { printf("%d\n", a); }; a = 1; f(0); } This has always failed, so isn't a regression, but for some reason the library change in r232274 now hits this bug.