This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]