summaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authoremsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-17 00:50:55 +0000
committeremsr <emsr@138bc75d-0d04-0410-961f-82ee72b054a4>2015-03-17 00:50:55 +0000
commitfc753aa012d58f1269f05718d3a083dbac0b95c6 (patch)
tree38dfcce3281f3ac2a7852f6219bf0a7d6d8dee9f /libcpp
parent31f6f05c6222767f7a8aa427141b887541b7064a (diff)
downloadgcc-fc753aa012d58f1269f05718d3a083dbac0b95c6.tar.gz
libcpp/
2015-03-16 Edward Smith-Rowland <3dw4rd@verizon.net> PR c++/64626 * lex.c (lex_number): If a number ends with digit-seps (') skip back and let lex_string take them. gcc/testsuite/ 2015-03-16 Edward Smith-Rowland <3dw4rd@verizon.net> PR c++/64626 g++.dg/cpp1y/pr64626-1.C: New. g++.dg/cpp1y/pr64626-2.C: New. g++.dg/cpp1y/digit-sep-neg.C: Adjust errors and warnings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@221470 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r--libcpp/ChangeLog6
-rw-r--r--libcpp/lex.c3
2 files changed, 9 insertions, 0 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog
index 2d84835b7b7..c7599495282 100644
--- a/libcpp/ChangeLog
+++ b/libcpp/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-16 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ PR c++/64626
+ * lex.c (lex_number): If a number ends with digit-seps (') skip back
+ and let lex_string take them.
+
2015-03-02 Markus Trippelsdorf <markus@trippelsdorf.de>
PR target/65261
diff --git a/libcpp/lex.c b/libcpp/lex.c
index 0dc47371183..bca56299132 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -1400,6 +1400,9 @@ lex_number (cpp_reader *pfile, cpp_string *number,
NORMALIZE_STATE_UPDATE_IDNUM (nst, *cur);
cur++;
}
+ /* A number can't end with a digit separator. */
+ while (cur > pfile->buffer->cur && DIGIT_SEP (cur[-1]))
+ --cur;
pfile->buffer->cur = cur;
}