This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH v4] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Chen Gang <gang dot chen dot 5i5j at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, <rth at redhat dot com>, Jeff Law <law at redhat dot com>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 26 Nov 2014 21:10:26 +0000
- Subject: Re: [PATCH v4] gcc/c-family/c-cppbuiltin.c: Let buffer enough to print host wide integer value
- Authentication-results: sourceware.org; auth=none
- References: <54763E30 dot 5010709 at gmail dot com>
On Thu, 27 Nov 2014, Chen Gang wrote:
> The original length 18 is not enough for HOST_WIDE_INT printing, need
> use 20 instead of.
>
> Also need additional bytes for printing related prefix and suffix, and
> give a related check.
>
> It passes testsuite under fedora 20 x86_64-unknown-linux-gnu.
>
> 2014-11-27 Chen Gang <gang.chen.5i5j@gmail.com>
>
> * c-family/c-cppbuiltin.c (builtin_define_with_int_value): Let
> buffer enough to print host wide integer value.
OK. Properly implementing the (-9223372036854775807LL-1) and similar
cases (when the value is the least int, long or long long on the target)
can be a followup fix.
--
Joseph S. Myers
joseph@codesourcery.com