public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53892] New: Invalid "duplicate case value" for C++11 utf-16 char literals
@ 2012-07-08 11:15 arnetheduck at gmail dot com
2012-07-08 11:58 ` [Bug c++/53892] " schwab@linux-m68k.org
0 siblings, 1 reply; 2+ messages in thread
From: arnetheduck at gmail dot com @ 2012-07-08 11:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53892
Bug #: 53892
Summary: Invalid "duplicate case value" for C++11 utf-16 char
literals
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: arnetheduck@gmail.com
In the following C++ function:
void f(char16_t c) {
switch(c) {
case u'\u0000':
case u'\u0001':
break;
}
}
G++, when invoked with "g++ -std=gnu++11 test.cpp" gives the following
unexpected error message:
test.cpp: In function ‘void f(char16_t)’:
test.cpp:5:5: error: duplicate case value
test.cpp:4:5: error: previously used here
Lines 4 & 5 are the two case values.
Changing either of the values to u'\u0002' makes the code compile correctly.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/53892] Invalid "duplicate case value" for C++11 utf-16 char literals
2012-07-08 11:15 [Bug c++/53892] New: Invalid "duplicate case value" for C++11 utf-16 char literals arnetheduck at gmail dot com
@ 2012-07-08 11:58 ` schwab@linux-m68k.org
0 siblings, 0 replies; 2+ messages in thread
From: schwab@linux-m68k.org @ 2012-07-08 11:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53892
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> 2012-07-08 11:58:31 UTC ---
.
*** This bug has been marked as a duplicate of bug 53690 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-08 11:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-08 11:15 [Bug c++/53892] New: Invalid "duplicate case value" for C++11 utf-16 char literals arnetheduck at gmail dot com
2012-07-08 11:58 ` [Bug c++/53892] " schwab@linux-m68k.org
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).