Commit ae17bedb by Richard Kenner

(cpp_lex): Correctly parse character constants.

From-SVN: r10566
parent a6cf191b
...@@ -357,11 +357,9 @@ cpp_reader *pfile; ...@@ -357,11 +357,9 @@ cpp_reader *pfile;
else else
max_chars = MAX_LONG_TYPE_SIZE / width; max_chars = MAX_LONG_TYPE_SIZE / width;
while (1) ++ptr;
while (ptr < tok_end && ((c = *ptr++) != '\''))
{ {
if (ptr >= CPP_PWRITTEN (pfile) || (c = *ptr++) == '\'')
break;
if (c == '\\') if (c == '\\')
{ {
c = cpp_parse_escape (pfile, &ptr); c = cpp_parse_escape (pfile, &ptr);
......
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