Commit 37aa341d by Ian Lance Taylor

compiler: Disallow rune literals with '\X'.

    
    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
parent 6b1786aa
ac462880e803a926005f1756b0f8d82ff0c47499 46117382a58843af60fc2feab68c433a96f79e79
The first line of this file holds the git revision number of the last The first line of this file holds the git revision number of the last
merge done from the gofrontend repository. merge done from the gofrontend repository.
...@@ -1197,7 +1197,6 @@ Lex::advance_one_char(const char* p, bool is_single_quote, unsigned int* value, ...@@ -1197,7 +1197,6 @@ Lex::advance_one_char(const char* p, bool is_single_quote, unsigned int* value,
: p + 1); : p + 1);
case 'x': case 'x':
case 'X':
*is_character = false; *is_character = false;
if (Lex::is_hex_digit(p[1]) && Lex::is_hex_digit(p[2])) if (Lex::is_hex_digit(p[1]) && Lex::is_hex_digit(p[2]))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment