This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++: hex number in error messages
- From: Richard Henderson <rth at redhat dot com>
- To: Mike Stump <mrs at apple dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 28 Mar 2003 16:39:02 -0800
- Subject: Re: C++: hex number in error messages
- References: <50BA7FEE-617C-11D7-B09F-003065A77310@apple.com>
On Fri, Mar 28, 2003 at 04:20:58PM -0800, Mike Stump wrote:
> ! sprintf (format, "0x%%x%%0%dx", HOST_BITS_PER_INT / 4);
> sprintf (digit_buffer, format, TREE_INT_CST_HIGH (val),
> TREE_INT_CST_LOW (val));
While we're at it, let's fix this -- "%x" is not valid for
HOST_WIDE_INT. You need to use something from hwint.h.
And, look! HOST_WIDE_INT_PRINT_DOUBLE_HEX! No need to
construct anything on the local stack.
r~