aboutsummaryrefslogtreecommitdiff
path: root/gcc/cccp.c
diff options
context:
space:
mode:
author(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>1999-07-26 06:43:09 +0000
committer(no author) <(no author)@138bc75d-0d04-0410-961f-82ee72b054a4>1999-07-26 06:43:09 +0000
commit4949771e1c38a86e7b4fa91487390a00df8adf60 (patch)
tree47b48eafc8ecc77290c6dfcd1e6a5138e58e3e2f /gcc/cccp.c
parent27bc6aeec64466281eb2cb1437b80a8182027d8b (diff)
This commit was manufactured by cvs2svn to create taggcc-2_95_test
'gcc-2_95_test'. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/tags/gcc-2_95_test@28256 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r--gcc/cccp.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index e89d00c574b..6e2d519f626 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -3981,11 +3981,33 @@ handle_directive (ip, op)
case '\'':
case '\"':
{
+ int backslash_newlines_p;
+
register U_CHAR *bp1
= skip_quoted_string (xp - 1, bp, ip->lineno,
- NULL_PTR, NULL_PTR, NULL_PTR);
- while (xp != bp1)
- *cp++ = *xp++;
+ NULL_PTR, &backslash_newlines_p,
+ NULL_PTR);
+ if (backslash_newlines_p)
+ while (xp != bp1)
+ {
+ /* With something like:
+
+ #define X "a\
+ b"
+
+ we should still remove the backslash-newline
+ pair as part of phase two. */
+ if (xp[0] == '\\' && xp[1] == '\n')
+ xp += 2;
+ else
+ *cp++ = *xp++;
+ }
+ else
+ /* This is the same as the loop above, but taking
+ advantage of the fact that we know there are no
+ backslash-newline pairs. */
+ while (xp != bp1)
+ *cp++ = *xp++;
}
break;