public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "uecker 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: Sun, 19 May 2024 06:24:42 +0000 [thread overview] Message-ID: <bug-115109-4-ePecSjEaLQ@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 #5 from uecker at gcc dot gnu.org --- Right, included the wrong test... The conversion seems right, if we have a predefined type. For enums with fixed underlying type we then have a constraint violation if the value does not fit. This may have been the intention also here, but it is not entirely clear. I made an -Woverflow warning for now, so it behaves similar to other initialization of constants and a warning is all that is required here. If the final value ends up the same, the types are compatible so this part is then fine.
next prev parent reply other threads:[~2024-05-19 6:24 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 [this message] 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 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-ePecSjEaLQ@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).