diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-11-07 09:58:29 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-11-07 09:58:29 -0500 |
commit | ae17bedb1812ae5bf9bfb29c20f0b779481521bc (patch) | |
tree | 93512eb05776ef735c23fa9fb762667d0b0ab36d /gcc/cppexp.c | |
parent | a6cf191be5ea87b90d5a7d0a33dba983ba3b7d08 (diff) | |
download | gcc-ae17bedb1812ae5bf9bfb29c20f0b779481521bc.zip gcc-ae17bedb1812ae5bf9bfb29c20f0b779481521bc.tar.gz gcc-ae17bedb1812ae5bf9bfb29c20f0b779481521bc.tar.bz2 |
(cpp_lex): Correctly parse character constants.
From-SVN: r10566
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r-- | gcc/cppexp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c index 7a90794..6b73ad3 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); |