This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++: hex number in error messages


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]