This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: __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 17:40:24 -0800
- Subject: Re: __attribute__ format doesn't work
Never mind, it was just a bug in my code. Sorry.
Mike
> 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
>