[bootstrap-O1] change value type to avoid sprintf buffer size warning
commit2792c2c72146666cddd3c5b6de39beb5cca6b9e5
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Jan 2017 03:34:25 +0000 (6 03:34 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 6 Jan 2017 03:34:25 +0000 (6 03:34 +0000)
treeef6481220571101b18b84ff2a010256645d29fce
parent33afc4b38abc1b41930dd9f0db30672eb67ccb99
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244121 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/c-family/ChangeLog
gcc/c-family/c-pretty-print.c