From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id AD9FB3857C7A; Wed, 6 Oct 2021 15:16:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD9FB3857C7A From: "msebor at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/93644] [10/11/12 Regression] spurious -Wreturn-local-addr with PHI of PHI Date: Wed, 06 Oct 2021 15:16:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: msebor at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: jeffreyalaw at gmail dot com X-Bugzilla-Target-Milestone: 11.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2021 15:16:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D93644 --- Comment #19 from Martin Sebor --- 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 =E2=80=98careadlinkat=E2=80=99: 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 diagnost= ic 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.=