aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-04-29 15:41:47 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-04-29 15:41:47 -0400
commit040c67b31d19015e3af7f2a56f7f9dd01ec11edb (patch)
tree7b13bd2876df745b5523a36039df4993a51ba967 /gcc
parent9b38c2fa8e7bc5e049f4b0e17f03585fe288a1ee (diff)
downloadgcc-040c67b31d19015e3af7f2a56f7f9dd01ec11edb.zip
gcc-040c67b31d19015e3af7f2a56f7f9dd01ec11edb.tar.gz
gcc-040c67b31d19015e3af7f2a56f7f9dd01ec11edb.tar.bz2
(macarg): Except for reporting error...
(macarg): Except for reporting error, treat unterminated macro call as if it were terminated, since `macroexpand' relies on *argptr being filled in. From-SVN: r9543
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cccp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 8834163..7c49e4d 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -8429,6 +8429,7 @@ macarg (argptr, rest_args)
int paren = 0;
int newlines = 0;
int comments = 0;
+ char *result = 0;
/* Try to parse as much of the argument as exists at this
input stack level. */
@@ -8461,8 +8462,8 @@ macarg (argptr, rest_args)
while (bp == ip->buf + ip->length) {
if (instack[indepth].macro == 0) {
- free (buffer);
- return "unterminated macro call";
+ result = "unterminated macro call";
+ break;
}
ip->macro->type = T_MACRO;
if (ip->free_ptr)
@@ -8538,7 +8539,7 @@ macarg (argptr, rest_args)
}
argptr->stringified_length = totlen;
}
- return 0;
+ return result;
}
/* Scan text from START (inclusive) up to LIMIT (exclusive),