From 8dc901ded38b2ad59f56ca82d9d8043d4fa92d18 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Wed, 29 May 2002 19:30:07 +0000 Subject: [PATCH] re PR preprocessor/6844 (Seg fault when trying to preprocess a file with lots of #define's) PR preprocessor/6844 * cppmacro.c (cpp_macro_definition): Reserve space for terminating NUL. From-SVN: r54014 --- gcc/ChangeLog | 6 ++++++ gcc/cppmacro.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e0f7c726502..8b9cce85f98 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-05-29 Neil Booth + + PR preprocessor/6844 + * cppmacro.c (cpp_macro_definition): Reserve space for terminating + NUL. + 2002-05-29 Eric Christopher * config/mips/linux.h (SUBTARGET_CPP_SPEC): Add support for diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index d154c0ccb85..28095f25e9e 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 -- 2.30.2