Go patch committed: Don't accept rune literals with \X
Ian Lance Taylor
iant@golang.org
Fri Jul 24 18:43:00 GMT 2015
The Go spec says that rune hex literals should start with \x. The Go
frontend was incorrectly accepting \X as well. This patch by Chris
Manghane fixes the problem. This is https://golang.org/issue/11575 .
Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.
Ian
pop
-------------- next part --------------
Index: gcc/go/gofrontend/MERGE
===================================================================
--- gcc/go/gofrontend/MERGE (revision 226180)
+++ gcc/go/gofrontend/MERGE (working copy)
@@ -1,4 +1,4 @@
-ac462880e803a926005f1756b0f8d82ff0c47499
+46117382a58843af60fc2feab68c433a96f79e79
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
Index: gcc/go/gofrontend/lex.cc
===================================================================
--- gcc/go/gofrontend/lex.cc (revision 225750)
+++ gcc/go/gofrontend/lex.cc (working copy)
@@ -1197,7 +1197,6 @@ Lex::advance_one_char(const char* p, boo
: p + 1);
case 'x':
- case 'X':
*is_character = false;
if (Lex::is_hex_digit(p[1]) && Lex::is_hex_digit(p[2]))
{
More information about the Gcc-patches
mailing list