From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 75AA13857C50; Thu, 25 Mar 2021 12:28:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 75AA13857C50 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/99768] [11 Regression] Bogus -Wuninitialized diagnostic with type punning Date: Thu, 25 Mar 2021 12:28:38 +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: 11.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: target_milestone blocked 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: Thu, 25 Mar 2021 12:28:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99768 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |11.0 Blocks| |24639 --- Comment #1 from Richard Biener --- I think the warning is correct - there is no valid initialization of a float entity in 'tmp' (in fact GCC removed the initialization from 'v'). It might be misleading but then what do you expect with invalid code? We could, in theory, do another walk to find an initialization with strict aliasing disabled and if we then find a candidate note that there are possi= ble initializations (we won't be able to prove they are definite inits) but a violation of strict-aliasing might hide them. OTOH this would pop up a l= ot and likely confuse people to use -fno-strict-aliasing to simply hide the warning but not fix the missing initialization. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D24639 [Bug 24639] [meta-bug] bug to track all Wuninitialized issues=