This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
__attribute__ format doesn't work
- From: Michael Vanier <mvanier at cs dot caltech dot edu>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Mar 2003 04:46:36 -0800
- Subject: __attribute__ format doesn't work
I believe I have found a bug in the attribute system of gcc.
I declared a function as follows:
extern Result ExecuteCommandStringFormatted(const char *cmd, ...)
__attribute__ ((format (printf, 1, 2)));
and then used it with a known bogus invocation in order to see if warnings
were generated:
ExecuteCommandStringFormatted("%g %g %g");
and compiled. No warnings were generated, even though warnings were
generated if I used (say) printf instead. My compiler options were -Wall
-Wstrict-prototypes. I am running gcc-3.2 on a Debian Linux system.
Is this a real bug, or am I doing something wrong?
Thanks,
Mike