public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/115109] Incorrect type of enumeration constant in redeclaration of enumeration constant (C23) Date: Tue, 18 Jun 2024 10:51:39 +0000 [thread overview] Message-ID: <bug-115109-4-aOVSZutF7Y@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-115109-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115109 --- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Martin Uecker <uecker@gcc.gnu.org>: https://gcc.gnu.org/g:c9b96a68860bfdee49d40b4a844af7c5ef69cd12 commit r15-1394-gc9b96a68860bfdee49d40b4a844af7c5ef69cd12 Author: Martin Uecker <uecker@tugraz.at> Date: Sat May 18 22:00:04 2024 +0200 c23: Fix for redeclared enumerator initialized with different type [PR115109] c23 specifies that the type of a redeclared enumerator is the one of the previous declaration. Convert initializers with different type accordingly and emit an error when the value does not fit. 2024-06-01 Martin Uecker <uecker@tugraz.at> PR c/115109 gcc/c/ * c-decl.cc (build_enumerator): When redeclaring an enumerator convert value to previous type. For redeclared enumerators use underlying type for computing the next value. gcc/testsuite/ * gcc.dg/pr115109.c: New test. * gcc.dg/c23-tag-enum-6.c: New test. * gcc.dg/c23-tag-enum-7.c: New test.
next prev parent reply other threads:[~2024-06-18 10:51 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-15 17:16 [Bug c/115109] New: " luigighiron at gmail dot com 2024-05-16 20:58 ` [Bug c/115109] " jsm28 at gcc dot gnu.org 2024-05-18 20:20 ` uecker at gcc dot gnu.org 2024-05-19 1:48 ` luigighiron at gmail dot com 2024-05-19 2:22 ` luigighiron at gmail dot com 2024-05-19 6:24 ` uecker at gcc dot gnu.org 2024-05-19 6:44 ` uecker at gcc dot gnu.org 2024-05-19 11:08 ` uecker at gcc dot gnu.org 2024-06-18 10:51 ` cvs-commit at gcc dot gnu.org [this message] 2024-06-19 7:56 ` clyon at gcc dot gnu.org 2024-06-19 8:09 ` uecker at gcc dot gnu.org 2024-06-19 8:17 ` jakub at gcc dot gnu.org
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-115109-4-aOVSZutF7Y@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).