From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D4DC5385843E; Wed, 19 Oct 2022 16:58:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D4DC5385843E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666198695; bh=B52j2nXPbmwyuhzrutHW1HGyWjFif355PqTGhbxzVoU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=mzEFRRb+6SsKWwLS6qx8+F51AGBCfsw4nb5R76PWI4xQRoQ9V21cG0YG26pMEfCCo y2UrRY+mEdSIwktwMaSAhQtigQYxQff+7WEJ35OxBFSDyY0nPKJRCC2eBhhNYFqYC/ gRky8VB5cRr2V4U7nt3AkgS3lV6hGeqVQlch6h48= From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107314] [13 Regression] New -Wsign-compare since r13-3360-g3b3083a598ca3f4b Date: Wed, 19 Oct 2022 16:58:12 +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.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com 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: 13.0 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=3D107314 --- Comment #1 from joseph at codesourcery dot com --- This is a deliberate change: if any enumerators are outside the range of=20 int, then all enumerators now have the enum type, rather than those=20 outside the range of int having the enum type and those inside the range=20 of int having type int. (The logic to determine the integer type with=20 which the enum type is compatible is unchanged. In the case of this=20 testcase, it produces unsigned int.) While, as noted in the commit message, the change could be made=20 conditional on C2x mode if necessary, I'm doubtful if that would actually=20 help grub; presumably they'd rather change things so they work in C2x mode= =20 rather than keeping using an older mode after -std=3Dgnu2x is the default,= =20 or postponing the fix until then.=