public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "thomas.mercier.jr at gmail dot com" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-61469-4-KZsoIrvw7i@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-61469-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61469 Thomas Mercier <thomas.mercier.jr at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |thomas.mercier.jr at gmail dot com --- Comment #13 from Thomas Mercier <thomas.mercier.jr at gmail dot com> --- Was this feature meant to be protected by -std=c23? It doesn't appear to be in GCC 13: /tmp$ cat test.c enum node_stat_item : unsigned { NR_LRU_BASE = -1, NR_INACTIVE_ANON = NR_LRU_BASE, /* must match order of LRU_[IN]ACTIVE */ 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=c11 test.c test.c:2:23: error: enumerator value outside the range of underlying type 2 | NR_LRU_BASE = -1, | ^ test.c:4:9: error: overflow in enumeration values 4 | NR_ACTIVE_ANON, /* " " " " " */ |
next prev parent reply other threads:[~2024-04-30 16:35 UTC|newest] Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-06-11 9:58 [Bug c/61469] New: " nick87720z at gmail dot com 2014-06-11 10:04 ` [Bug c/61469] " redi at gcc dot gnu.org 2014-06-11 10:13 ` nick87720z at gmail dot com 2014-06-11 10:25 ` redi at gcc dot gnu.org 2014-06-11 10:40 ` mpolacek at gcc dot gnu.org 2014-06-11 11:29 ` nick87720z at gmail dot com 2021-12-05 10:20 ` pinskia at gcc dot gnu.org 2022-05-17 10:28 ` egallager at gcc dot gnu.org 2022-05-17 17:53 ` joseph at codesourcery dot com 2022-10-27 0:57 ` jsm28 at gcc dot gnu.org 2022-10-28 0:38 ` cvs-commit at gcc dot gnu.org 2022-10-28 0:39 ` jsm28 at gcc dot gnu.org 2024-04-30 16:35 ` thomas.mercier.jr at gmail dot com [this message] 2024-04-30 16:39 ` pinskia at gcc dot gnu.org 2024-04-30 16:48 ` thomas.mercier.jr at gmail dot com 2024-04-30 16:52 ` pinskia at gcc dot gnu.org 2024-04-30 16:54 ` thomas.mercier.jr at gmail dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-61469-4-KZsoIrvw7i@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).