The maximize 64-bits integer decimal string length excluding NUL is 20 ( '-9223372036854775808'), so need use 20 instead of 18 for HOST_WIDE_INT.
2014-11-16 Chen Gang <gang.chen.5...@gmail.com> * c-family/c-cppbuiltin.c (builtin_define_with_int_value): Use 20 instead of 18 for the maximize 64-bits integer decimal string length --- gcc/c-family/c-cppbuiltin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 26fabc2..8e8cec4 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -1345,7 +1345,7 @@ builtin_define_with_int_value (const char *macro, HOST_WIDE_INT value) { char *buf; size_t mlen = strlen (macro); - size_t vlen = 18; + size_t vlen = 20; /* maximize value length: -9223372036854775808 */ size_t extra = 2; /* space for = and NUL. */ buf = (char *) alloca (mlen + vlen + extra); -- 1.9.3