[Bug middle-end/104958] missing -Wdangling-pointer leaking local address through struct member
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 11 01:56:45 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104958
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
A C++ example with lamdbas which shows the same issue here (the IR is basically
the same):
int outer;
auto fn1(int val = 0){
return [&]{
outer = val; // invalid
};
}
More information about the Gcc-bugs
mailing list