c-pretty-print.c
55.6 KB
-
[bootstrap-O1] change value type to avoid sprintf buffer size warning · 435f3f7a
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
Alexandre Oliva committed