From 37aa341d9dffe66a784d3d1453042e9e7d315ec9 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 24 Jul 2015 18:28:40 +0000 Subject: [PATCH] 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 --- gcc/go/gofrontend/MERGE | 2 +- gcc/go/gofrontend/lex.cc | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 2610a78ced0..797ec549aad 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -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. diff --git a/gcc/go/gofrontend/lex.cc b/gcc/go/gofrontend/lex.cc index aa7071dbe78..9c4192760f9 100644 --- a/gcc/go/gofrontend/lex.cc +++ b/gcc/go/gofrontend/lex.cc @@ -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])) { -- 2.30.2