This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -Wformat-sign-mismatch?
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- To: Dan Kegel <dkegel at ixiacom dot com>
- Cc: <gcc at gcc dot gnu dot org>, Jake Holland <jholland at ixiacom dot com>
- Date: Mon, 10 Feb 2003 20:40:42 +0000 (GMT)
- Subject: 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