This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/70104] Should give an error when using multiple case value in switch
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 06 Mar 2016 10:42:04 +0000
- Subject: [Bug c/70104] Should give an error when using multiple case value in switch
- Auto-submitted: auto-generated
- References: <bug-70104-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70104
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
'a' || 'A' is 1, so there is no reason to give an error about it.
The error in the second case is because you have two case labels with the same
value, 1. That is not allowed in a switch.