[C PATCH] Warn about variadic main (PR c/60156)
Jeff Law
law@redhat.com
Thu Apr 24 21:27:00 GMT 2014
On 02/12/14 02:51, Marek Polacek wrote:
> I figured it might be a good idea to warn about variadic main decl
> (well, not in freestanding environment where it's
> implementation-defined).
>
> Regtested/bootstrapped on x86_64-linux, ok for 5.0?
>
> 2014-02-12 Marek Polacek <polacek@redhat.com>
>
> PR c/60156
> c-family/
> * c-common.c (check_main_parameter_types): Warn about variadic main.
> testsuite/
> * c-c++-common/pr60156.c: New test.
OK. Though in practice I doubt this is going to catch many real bugs.
Are people still giving main a stdargs style signature?
jeff
More information about the Gcc-patches
mailing list