From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BE3AC3858C52; Fri, 20 Jan 2023 21:05:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BE3AC3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674248718; bh=iuW6tIz/VsUAmsjXyppYxJeUAbxeYiaJDSykc+B+4a4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=HZ2x5swBR5KNr26wnaJQy0htet111GSG6Y/MtdRYzElq0UZx9eTg8GDI0fLNa9S0Y 91TBzQRTUhV4ILQ5sQq2PGNTPEbAK1hgiN0kaHxry6BN7eGiO3LV28Br0TNoWeYJQA jHrNG00150dCiN6xiAadBAxIRwUIzd51rX6+n//k= From: "segher at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/108483] gcc warns about suspicious constructs for unevaluted ?: operand Date: Fri, 20 Jan 2023 21:05:18 +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: 10.2.1 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: enhancement X-Bugzilla-Who: segher 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: 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=3D108483 --- Comment #4 from Segher Boessenkool --- (In reply to Andrew Pinski from comment #1) > I doubt this will be changed anytime soon, see PR 4210 for the history on > why. That PR is about an UB case though. In this case the code is perfectly well defined (just IB). The warning code here sees a sizeof divided by a sizeof and wants to warn f= or it as being maybe wrong, although it would be pretty easy to see it isn't.=