From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DD068385840A; Tue, 22 Nov 2022 14:53:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD068385840A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669128782; bh=kDgvLk5RbalPT2V7DTM2EH2dNa74HlAxIhTZrfbzNBU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=X6L4XYXWXT/84vqX98FQuyvDCBNrmjAoroox/JSUPRd1fFJlCGZzT3c8F+AQ4X3Bf qB+LqQrVK1tIob1cSYWoOSYHvv7jrNmfU4cseX+lIn0xYYx+4B6QpAOBTZVVQwsxGH tGPtWucu7sbCRWgxok8ED4qsiCCjg57RwrpBHvxw= From: "macro at orcam dot me.uk" 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: Tue, 22 Nov 2022 14:53:01 +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: macro at orcam dot me.uk 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 #18 from Maciej W. Rozycki --- Well, according to the assertion triggered `typeof (EM_MAX_SLOTS)' will yield a data type of a different width depending on the compiler version. Even if this GNU extension does not constitute a part of the ABI it does guarantee link incompatibility for a feature we've had for decades now, even if the old semantics was unintentional. Data corruption cannot be ruled out. Besides, `sizeof (EM_MAX_SLOTS)' can also be used to build a data type (an array type) and process it. So I think a pedantic warning is not enough to fulfil the principle of least surprise for the real world out there. Therefore I maintain that for pre-C2x compilations we either need to keep the old semantics, possibly with a fat warning under `-Wall', or as I say make it a hard error.=