https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90549
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution|--- |FIXED Target Milestone|--- |10.0 --- Comment #6 from Martin Sebor <msebor at gcc dot gnu.org> --- Fixed via r273261. Both functions in the test case are now diagnosed: pr90549.c: In function āfā: pr90549.c:7:10: warning: function may return address of local variable [-Wreturn-local-addr] 7 | return p; // -Wreturn-local-addr (good) | ^ pr90549.c:5:7: note: declared here 5 | int b[2]; | ^ pr90549.c: In function āgā: pr90549.c:15:12: warning: function may return address of local variable [-Wreturn-local-addr] 15 | return p + 1; // missing -Wreturn-local-addr | ~~^~~ pr90549.c:12:7: note: declared here 12 | int b[2]; | ^