]> git.ipfire.org Git - thirdparty/gcc.git/commit
libcpp: Fix up raw string literal parsing error-recovery [PR96323]
authorJakub Jelinek <jakub@redhat.com>
Tue, 28 Jul 2020 13:40:15 +0000 (15:40 +0200)
committerGiuliano Belinassi <giuliano.belinassi@usp.br>
Mon, 17 Aug 2020 16:19:58 +0000 (13:19 -0300)
commitfa2f6a463038e07689cfff67c9311ee7b34a20aa
tree6c35fc753b0c8f25dd985a60aac24316bf8c5b9d
parent7b95b7f844d1cd857a858a1e48a8791e1e7094c9
libcpp: Fix up raw string literal parsing error-recovery [PR96323]

For (invalid) newline inside of the raw string literal delimiter, doing
continue means we skip the needed processing of newlines.  Instead of
duplicating that, this patch just doesn't continue for those.

2020-07-28  Jakub Jelinek  <jakub@redhat.com>

PR preprocessor/96323
* lex.c (lex_raw_string): For c == '\n' don't continue after reporting
an prefix delimiter error.

* c-c++-common/cpp/pr96323.c: New test.
gcc/testsuite/c-c++-common/cpp/pr96323.c [new file with mode: 0644]
libcpp/lex.c