(handle_directive): In `#include <xxx>' directives, remove backslash-newline properly.
authorRichard Kenner <kenner@gcc.gnu.org>
Wed, 7 Sep 1994 23:31:32 +0000 (19:31 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Wed, 7 Sep 1994 23:31:32 +0000 (19:31 -0400)
(handle_directive): In `#include <xxx>' directives, remove
backslash-newline properly.  Don't allow any other newlines.

From-SVN: r8036

gcc/cccp.c

index bcc0edc6d74b401ac3433c8cf19536f6666e4e77..bd83ebf16b561be29df0cf2f13b24530cc0b3224 100644 (file)
@@ -3608,7 +3608,14 @@ handle_directive (ip, op)
        case '<':
          if (!kt->angle_brackets)
            break;
-         while (*bp && *bp != '>') bp++;
+         while (bp < limit && *bp != '>' && *bp != '\n') {
+           if (*bp == '\\' && bp[1] == '\n') {
+             ip->lineno++;
+             copy_command = 1;
+             bp++;
+           }
+           bp++;
+         }
          break;
 
        case '/':