From: Neil Booth Date: Wed, 29 May 2002 19:30:07 +0000 (+0000) Subject: re PR preprocessor/6844 (Seg fault when trying to preprocess a file with lots of... X-Git-Tag: releases/gcc-3.3.0~4727 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8dc901ded38b2ad59f56ca82d9d8043d4fa92d18;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e0f7c726502d..8b9cce85f989 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 d154c0ccb85d..28095f25e9e2 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