On Jan 4, 2017, Martin Sebor wrote:
> The manual recommends to use a length modifier to constrain the length
> of output to that of a narrower type:
> sprintf (xname, "", ((unsigned short)((uintptr_t)(t) & 0x)));
> This should work even without optimization.
It might not work if short h
On 01/03/2017 10:39 AM, Jeff Law wrote:
On 01/02/2017 10:28 PM, Alexandre Oliva wrote:
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.
I couldn't find a better way to
On 01/02/2017 10:28 PM, Alexandre Oliva wrote:
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.
I couldn't find a better way to avoid the warning at -O1 than growing
the
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.
I couldn't find a better way to avoid the warning at -O1 than growing
the buffer so that there's no doubt the output will