r244121 - in /trunk/gcc/c-family: ChangeLog c-p...
aoliva@gcc.gnu.org
aoliva@gcc.gnu.org
Fri Jan 6 03:34:00 GMT 2017
Author: aoliva
Date: Fri Jan 6 03:34:25 2017
New Revision: 244121
URL: https://gcc.gnu.org/viewcvs?rev=244121&root=gcc&view=rev
Log:
[bootstrap-O1] change value type to avoid sprintf buffer size warning
In stage2 of bootstrap-O1, the code that warns if sprintf might
overflow its output buffer cannot tell that an unsigned value narrowed
to 16 bits will fit in 4 bytes with %4x.
Converting the value to 'unsigned short' makes it obvious that it
fits, at least on machines with 16-bit shorts.
for gcc/c-family/ChangeLog
* c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
value to unsigned short to fit in 4 hex digits without
warnings.
Modified:
trunk/gcc/c-family/ChangeLog
trunk/gcc/c-family/c-pretty-print.c
More information about the Gcc-cvs
mailing list