-Wformat-sign-mismatch?

Joseph S. Myers jsm28@cam.ac.uk
Mon Feb 10 20:40:00 GMT 2003


On Mon, 10 Feb 2003, Dan Kegel wrote:

> At our company, Gimpel's PC-Lint flagged an warning
> in code similar to this:
>          unsigned long iResult;
>          sscanf(s, "%ld", &iResult);
> 
> Do we want gcc to detect such mismatches, too?
> I don't think it could as of the gcc 3.2 I tried.

Use -Wformat -pedantic to detect such mismatches.

-- 
Joseph S. Myers
jsm28@cam.ac.uk



More information about the Gcc mailing list