From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E0E03384F490; Mon, 21 Nov 2022 18:10:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0E03384F490 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669054223; bh=/jP0pm2o/PST/XeKvVSwYvY4eTGUTo4OmkwLldNy6lg=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZxEVpCDVyWWZ81D5e9p5hfT3d+UqxowsDH/7KhXacwBZKkeNZ+F4Fw9FAmGmZikA7 RXoh9/6/75uoNVHB2JHiJPRf09WHnZ+DY3SeInYs4BfDWxTOYI1VmCnZ/O9UQZ2YDr H03l3TWkhVGoDMEmzGFeSHs6RZliHOujvG39siOA= From: "joseph at codesourcery dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/107405] [13 Regression] enum change causing Linux kernel to fail to build due to Linux depending on old behavior Date: Mon, 21 Nov 2022 18:10:22 +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: X-Bugzilla-Severity: normal X-Bugzilla-Who: joseph at codesourcery dot com 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: 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=3D107405 --- Comment #17 from joseph at codesourcery dot com --- On Sat, 19 Nov 2022, macro at orcam dot me.uk via Gcc-bugs wrote: > If in older C standard versions such enums are invalid, then I think > this should be a hard error rather than a silent ABI change for the code > produced. Not all code out there will have sanity checks such as the There is no ABI change. The size of the enum type does not change. What=20 changes is the type given to enum constants in such an enum, if the value=20 of the enum constant fits in int (now all enum constants in such an enum=20 have the enum type rather than only those outside the range of int having=20 the enum type).=