From ae17bedb1812ae5bf9bfb29c20f0b779481521bc Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Tue, 7 Nov 1995 09:58:29 -0500 Subject: [PATCH] (cpp_lex): Correctly parse character constants. From-SVN: r10566 --- gcc/cppexp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gcc/cppexp.c b/gcc/cppexp.c index 7a907941788..6b73ad34e4d 100644 --- a/gcc/cppexp.c +++ b/gcc/cppexp.c @@ -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);