[bootstrap-O1] change value type to avoid sprintf buffer size warning
authorAlexandre Oliva <aoliva@redhat.com>
Fri, 6 Jan 2017 03:34:25 +0000 (03:34 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Fri, 6 Jan 2017 03:34:25 +0000 (03:34 +0000)
commit435f3f7adf6c1ae34547c4859205f4ec7beb8a93
treeef6481220571101b18b84ff2a010256645d29fce
parenta172ab790bb47dc296099506157019f8d4874637
[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.

From-SVN: r244121
gcc/c-family/ChangeLog
gcc/c-family/c-pretty-print.c