https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93644

--- Comment #19 from Martin Sebor <msebor at gcc dot gnu.org> ---
GCC 12 has changed to point the warning at the closing curly as suggested in
pr90735 so its output now looks like this:

pr93644.c: In function ‘careadlinkat’:
pr93644.c:30:1: warning: function may return address of local variable
[-Wreturn-local-addr]
   30 | }
      | ^
pr93644.c:6:8: note: declared here
    6 |   char stack_buf[1024];
      |        ^~~~~~~~~

With that change the warning can also be suppressed by #pragma GCC diagnostic
placed before the closing curly.

GCC 12 also has separated the uninitialized predicate analyzer into a
standalone module but no warning except -Wmaybe-uninitialized makes use of it
yet.  This bug might be an opportunity to try it out.

Reply via email to