Kai Tietz wrote: > 2012/1/14 Christian Franke<[email protected]>: >> ... >> >> The static attribute makes no difference in the C++ case: >> >> $ i686-w64-mingw32-g++ -Wformat testfmt2.c >> testfmt2.c: In function 'int main()': >> testfmt2.c:18:24: warning: unknown conversion type character 'l' in format >> testfmt2.c:18:24: warning: too many arguments for format >> >> $ i686-w64-mingw32-g++ -Wformat -DSTATIC testfmt2.c >> testfmt2.c: In function 'int main()': >> testfmt2.c:18:24: warning: unknown conversion type character 'l' in format >> testfmt2.c:18:24: warning: too many arguments for format >> >> $ i686-w64-mingw32-g++ -Wformat -fno-builtin testfmt2.c >> >> Christian > Yeah, this is related to builtins. If you turn of builtins, you will > see no such warning. Question here is, if we really need inline for > C++, or if we shouldn't use here static too.
Same bogus warning appears in C++ if "inline" is replaced by "static" or "static inline". > The point about C++ is, that we lack a default prototype. Yes, but if some "int printf(const char *, ...)" prototype is specified, "__attribute__((format(printf(1,2)))" from builtin info is always added silently by g++. Even an "__attribute__(format(gnu_printf(1,2)))" in the prototype does not prevent this. Probably an older problem in the compiler which was not visible in the past as long as "#define printf __mingw_printf" was used. Christian ------------------------------------------------------------------------------ RSA(R) Conference 2012 Mar 27 - Feb 2 Save $400 by Jan. 27 Register now! http://p.sf.net/sfu/rsa-sfdev2dev2 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
