[Bug middle-end/104958] missing -Wdangling-pointer leaking local address through struct member

2022-12-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104958

--- Comment #2 from Andrew Pinski  ---
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
  };
}

[Bug middle-end/104958] missing -Wdangling-pointer leaking local address through struct member

2022-12-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104958

Andrew Pinski  changed:

   What|Removed |Added

 CC||ozixtheorange at gmail dot com

--- Comment #1 from Andrew Pinski  ---
*** Bug 106508 has been marked as a duplicate of this bug. ***

[Bug middle-end/104958] missing -Wdangling-pointer leaking local address through struct member

2022-03-16 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104958

Martin Sebor  changed:

   What|Removed |Added

   Last reconfirmed||2022-03-16
   Keywords||diagnostic
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW
 Blocks||104077


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104077
[Bug 104077] bogus/missing -Wdangling-pointer