compiler: Disallow rune literals with '\X'.
authorIan Lance Taylor <ian@gcc.gnu.org>
Fri, 24 Jul 2015 18:28:40 +0000 (18:28 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 24 Jul 2015 18:28:40 +0000 (18:28 +0000)
    http://golang.org/ref/spec#Rune_literals states that rune literals
    encoded as hex bytes must begin with lowercase '\x'.
    Fixes golang/go#11575.

    Reviewed-on: https://go-review.googlesource.com/12158

From-SVN: r226184

gcc/go/gofrontend/MERGE
gcc/go/gofrontend/lex.cc

index 2610a78ced0aa42081f1cafb804b4add970f6990..797ec549aadddfcb47cd4433806ac7c3d0cadf42 100644 (file)
@@ -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 aa7071dbe78050b7571313c50ec6a23167afcb4d..9c4192760f99e25d9fe1f22d326465a8736169fc 100644 (file)
@@ -1197,7 +1197,6 @@ Lex::advance_one_char(const char* p, bool is_single_quote, unsigned int* value,
                  : p + 1);
 
        case 'x':
-       case 'X':
          *is_character = false;
          if (Lex::is_hex_digit(p[1]) && Lex::is_hex_digit(p[2]))
            {