From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A52613858C78; Thu, 1 Feb 2024 07:43:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A52613858C78 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1706773396; bh=6447LfWKlI2O/r0y6HOi7QIMCp8Nv8GaqXoTIokCpV0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ePkUosGfQabdNDtR2l+ee9xcyiHAbvImKVvv+jccCd3bbK9oVnFBqX5r2x0lKLV6e aKt4KaZ3SOP8sH9j57hZc7MhpKPoO9g2vmP2VLO/mzVfHZoLggyOQAFxcP+n7RjsKg sz6w4FhSyKMRAAWta8jCvKBGXb8lbh3Ph60MpLHA= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113687] -Warray-bounds is not emitted inside class method Date: Thu, 01 Feb 2024 07:43:16 +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.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org 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: blocked everconfirmed bug_status cf_reconfirmed_on 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=3D113687 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |56456 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-02-01 --- Comment #2 from Richard Biener --- (In reply to Andrew Pinski from comment #1) > The warning only happens if the vague linkage function is used. and IIRC > that is by design. Yeah, we try to avoid diagnosing things on "dead" code and here the whole functions are dead. IIRC even -fanalyzer runs after cgraph removes unreach= able functions. It would be still nice to diagnose these kind of trivial cases. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56456 [Bug 56456] [meta-bug] bogus/missing -Warray-bounds=