This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -Wformat-sign-mismatch?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]