(cpp_lex): Correctly parse character constants.

From-SVN: r10566
This commit is contained in:
Richard Kenner 1995-11-07 09:58:29 -05:00
parent a6cf191be5
commit ae17bedb18
1 changed files with 2 additions and 4 deletions

View File

@ -357,11 +357,9 @@ cpp_reader *pfile;
else
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 == '\\')
{
c = cpp_parse_escape (pfile, &ptr);