From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 451793858D35; Thu, 12 Jan 2023 11:34:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 451793858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1673523250; bh=2dxcEI2bxBrjs8JKZWmwWLX9RFL4FPv+y6/RDJjoz/w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=C6f0uZ9jk71ugUTzS2lES0em7I3reZLsKkvp91joKbWb0O+ZXSqMYzGfLTj9HnrWR DxlWjwb5fz4V5/bgeiK55ZGRH7Znao8nmaOn8/3JkKf+3DNeWwN4UApngVjlFrd0dx ToUDZq+je5AM8VojZRX6TFGkInFeP/7+kozX/Iqo= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108374] [12/13 Regression] unexpected -Wstringop-overflow when using std::atomic and std::shared_ptr Date: Thu, 12 Jan 2023 11:34:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D108374 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #6 from Jakub Jelinek --- The warning is simply badly designed like most of the middle-end warnings. As has been discussed, we should have some switch to decide what to do when= we have such provable UB, and the possibilities should be turn it into __builtin_unreachable (), turn it into __builtin_trap () or for users who d= on't mind seeing lots of false positives keep the warning. Though perhaps now t= hat we have -funreachable-traps the option could be just 2 possibilities, unreachable vs. (useless) warnings, with the default of the former.=