Commit 8dc901de by Neil Booth Committed by Neil Booth

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
parent e793a714
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> 2002-05-29 Eric Christopher <echristo@redhat.com>
* config/mips/linux.h (SUBTARGET_CPP_SPEC): Add support for * config/mips/linux.h (SUBTARGET_CPP_SPEC): Add support for
......
...@@ -1537,7 +1537,7 @@ cpp_macro_definition (pfile, node) ...@@ -1537,7 +1537,7 @@ cpp_macro_definition (pfile, node)
} }
/* Calculate length. */ /* Calculate length. */
len = NODE_LEN (node) + 1; /* ' ' */ len = NODE_LEN (node) + 2; /* ' ' and NUL. */
if (macro->fun_like) if (macro->fun_like)
{ {
len += 4; /* "()" plus possible final ".." of named len += 4; /* "()" plus possible final ".." of named
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment