From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 39B9C3858C33; Sun, 28 Jan 2024 16:21:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 39B9C3858C33 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706458870; bh=pa4UTtzB/nwbE4XGZ5M2FI2m4LIgadp+rS/ha4oQwF8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rx7SNnDVZ33RGHi/EYhmmZDoh1ERUIMTAqsaHLTi0it17CXkrHl3w2btemZhNMI85 lxn9V5GDVVZOjKxHBenffGyITrNQpgG0FmmI03D/Df5jmFH5WqfLKTkBqN5nZWWkMi d4OsaTzW3wMeC/CBZXjt2h1RlzQbL/b3YukFah4Y= From: "ostash at ostash dot kiev.ua" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110075] Bogus -Wdangling-reference Date: Sun, 28 Jan 2024 16:21:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: ostash at ostash dot kiev.ua X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110075 --- Comment #6 from Viktor Ostashevskyi --- (In reply to Marek Polacek from comment #5) > Yes, because we'd have to analyze the body of the function to see that it > does not return one of the parameters, which often we can't do. >=20 > There will be an attribute soon to suppress that warning. I'm wondering whether this diagnostics should be in -Wall or -Wextra at all. It is assumed that diagnostics in -Wall or -Wextra generally "works". Here, diagnostics clearly fails on simplest case and I don't think marking = huge codebase with some attribute is a proper solution...=