aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/cppmacro.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e0f7c72..8b9cce8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-29 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ PR preprocessor/6844
+ * cppmacro.c (cpp_macro_definition): Reserve space for terminating
+ NUL.
+
2002-05-29 Eric Christopher <echristo@redhat.com>
* config/mips/linux.h (SUBTARGET_CPP_SPEC): Add support for
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index d154c0c..28095f2 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -1537,7 +1537,7 @@ cpp_macro_definition (pfile, node)
}
/* Calculate length. */
- len = NODE_LEN (node) + 1; /* ' ' */
+ len = NODE_LEN (node) + 2; /* ' ' and NUL. */
if (macro->fun_like)
{
len += 4; /* "()" plus possible final ".." of named