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 2610a78..797ec54 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 aa7071d..9c41927 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]))
            {