]> gcc.gnu.org Git - gcc.git/commitdiff
(cpp_lex): Correctly parse character constants.
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 7 Nov 1995 14:58:29 +0000 (09:58 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 7 Nov 1995 14:58:29 +0000 (09:58 -0500)
From-SVN: r10566

gcc/cppexp.c

index 7a9079417880b2c0bc3adf522557fb8cd102602c..6b73ad34e4dce09d6edfc7af74662e1755a0f680 100644 (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);
This page took 0.058396 seconds and 5 git commands to generate.