aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-09-07 19:31:32 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-09-07 19:31:32 -0400
commita957c7944d610aed6f0be44d8716ba338daab3f6 (patch)
tree10043acc3efbf588fccb9a9b8ad1e9ac8b72c7ce /gcc
parent6d545b717cc72d1394ad5f9c289ab2617a7767d3 (diff)
downloadgcc-a957c7944d610aed6f0be44d8716ba338daab3f6.zip
gcc-a957c7944d610aed6f0be44d8716ba338daab3f6.tar.gz
gcc-a957c7944d610aed6f0be44d8716ba338daab3f6.tar.bz2
(handle_directive): In `#include <xxx>' directives, remove backslash-newline properly.
(handle_directive): In `#include <xxx>' directives, remove backslash-newline properly. Don't allow any other newlines. From-SVN: r8036
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cccp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index bcc0edc..bd83ebf 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -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 '/':