[Bug c++/69433] missing -Wreturn-local-addr assigning address of a local to a static

2020-05-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433 Martin Sebor changed: What|Removed |Added CC||dank at kegel dot com --- Comment #5

[Bug c++/69433] missing -Wreturn-local-addr assigning address of a local to a static

2017-08-26 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433 --- Comment #4 from Andrew Pinski --- >IMO we should look into why this optimization doesn't happen before PRE (why >not FRE for instance?). Because the reads from s are only partially redundant (PRE) and not fully (vs FRE). :)

[Bug c++/69433] missing -Wreturn-local-addr assigning address of a local to a static

2017-08-26 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433 --- Comment #3 from Marc Glisse --- f3: the inliner silently removes s (and the assignment to it) as write-only. You need to add a function that reads s (we don't warn in that case either, of course, but that's a first step). f2: the (atomic)

[Bug c++/69433] missing -Wreturn-local-addr assigning address of a local to a static

2017-08-25 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433 Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug c++/69433] missing -Wreturn-local-addr assigning address of a local to a static

2016-01-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement

[Bug c++/69433] missing -Wreturn-local-addr assigning address of a local to a static

2016-01-22 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69433 --- Comment #1 from Andrew Pinski --- Hmm, I don't know how GCC can detect this except with optimizations because the assignment to s happens at runtime.