[cfe-dev] warning with conditional operator and printf, is this a bug ?
kremenek at apple.com
Fri Nov 4 09:15:13 CDT 2011
Can you file a bug report and CC me?
On Nov 4, 2011, at 12:20 AM, John McCall wrote:
> On Nov 3, 2011, at 10:34 PM, David Blaikie wrote:
>>> This is a test case, not sure if its a bug with printf.
>> I don't believe this is a bug, no.
> It's a clear false positive in our format checker. Promoting an unsigned value to a wider signed type performs a zero-extend, so the distinction between signed and unsigned formats is irrelevant and either %d or %ud should be acceptable. (The reverse would not be true: we should still warn about using unsigned formats with promoted signed types).
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
More information about the cfe-dev