From: SourceForge.net <no...@so...> - 2005-01-02 08:01:11
|
Bugs item #939155, was opened at 2004-04-21 21:01 Message generated for change (Comment added) made by dannysmith You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=939155&group_id=2435 Category: gcc Group: None Status: Open Resolution: Later Priority: 5 Submitted By: Wim Heirman (wheirman) Assigned to: Danny Smith (dannysmith) Summary: -Wformat doesn't know %uI64 is for 64-bit, not %ull Initial Comment: In msvcrt, the length modifier in a printf()-format for long long datatypes is "I64", not "ll" like in glibc. However gcc doens't know this, and complains that the format string and arguments of a printf-function don't match. ---------------------------------------------------------------------- >Comment By: Danny Smith (dannysmith) Date: 2005-01-02 21:01 Message: Logged In: YES user_id=11494 > Strangely mingw32-gcc version 3.4.2 (built as a > cross-compiler) still seems to generate these warnings for me: Yes the sticky plaster I applied to 3.4.2 sources only affects mingw-hosted compiler. It will be fixed properly one day. I'll apply the patch Mark Mitchell suggested to the 3.4.4. mingw release. Danny ---------------------------------------------------------------------- Comment By: J. Ali Harlow (j_ali) Date: 2005-01-02 20:20 Message: Logged In: YES user_id=64456 Strangely mingw32-gcc version 3.4.2 (built as a cross-compiler) still seems to generate these warnings for me: percy.juiblex.co.uk1.221% mingw32-gcc --version mingw32-gcc (GCC) 3.4.2 (mingw-special) Copyright (C) 2004 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. percy.juiblex.co.uk1.222% more test.c #include <stdlib.h> #include <stdio.h> int main() { __int64 i=3; printf("%I64u\n",i); return 0; } percy.juiblex.co.uk1.223% mingw32-gcc -Wformat test.c test.c: In function `main': test.c:7: warning: unsigned int format, different type arg (arg 2) ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2004-08-02 21:59 Message: Logged In: YES user_id=11494 This is fixed in mingw relase of gcc-3.4.1, but not yet in official FSF sources. It is low priority for me, so if someone wants to follow up with a submission to GCC, feel free. The patch I put into mingw local release probably has way to many ifdef __MINGW32__'s to be palatable to GCC, so it will need some work. Danny ---------------------------------------------------------------------- Comment By: Ed Schaller (schallee) Date: 2004-08-01 07:08 Message: Logged In: YES user_id=2001 Ok, now I feel like a moron. Sorry. Yes I can confirm that 3.4.1 does fix the issue. I feel more like a moron in that I downloaded and installed it to check some other problems before submitting a patch but didn't check this one. ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2004-07-31 10:40 Message: Logged In: YES user_id=11494 Have you tried with mingw release of gcc-3.4.1? Danny ---------------------------------------------------------------------- Comment By: Ed Schaller (schallee) Date: 2004-07-31 07:48 Message: Logged In: YES user_id=2001 Likewise for %I64u. Should this one be reported to gcc folks instead of mingw? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=939155&group_id=2435 |