From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 843B43858D1E; Tue, 30 Apr 2024 16:35:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 843B43858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714494917; bh=RX78EQIObDwrvSezVDbDMnEHoPtKXvKTW6Ba25SVB2Q=; h=From:To:Subject:Date:In-Reply-To:References:From; b=yFvoTrek4mWEjvInQa4U7phLf191yquwVd5U9hZthnXAMhQ8Benpl7gtGPZSSyTbj 9vXzJ6+nOgF+ji587Ogdyz+ya8uDhAoAw3Gad8r2mjItcB0GPdSg82suG3XOQE7eJv TFxEVh+M/rvj+rqWFoADhxNvTsaEhQFARFvmHObI= From: "thomas.mercier.jr at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/61469] language feature: Support for enum underlying type Date: Tue, 30 Apr 2024 16:35:15 +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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: thomas.mercier.jr at gmail dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: jsm28 at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D61469 Thomas Mercier changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thomas.mercier.jr at gmail= dot com --- Comment #13 from Thomas Mercier --- Was this feature meant to be protected by -std=3Dc23? It doesn't appear to = be in GCC 13: /tmp$ cat test.c enum node_stat_item : unsigned { NR_LRU_BASE =3D -1, NR_INACTIVE_ANON =3D NR_LRU_BASE, /* must match order of LRU_[IN]AC= TIVE */ NR_ACTIVE_ANON, /* " " " " " */ NR_INACTIVE_FILE, }; int main() {} /tmp$ gcc --version gcc (Debian 13.2.0-10) 13.2.0 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. /tmp$ gcc -std=3Dc11 test.c test.c:2:23: error: enumerator value outside the range of underlying type 2 | NR_LRU_BASE =3D -1, | ^ test.c:4:9: error: overflow in enumeration values 4 | NR_ACTIVE_ANON, /* " " " " "=20=20= =20=20=20=20=20=20 */ |=