int foo (); vs int foo (void);
Doug Evans
dje@transmeta.com
Tue Jun 10 19:17:00 GMT 2003
Andrew Cagney writes:
> Ok, so I knew there was a reason for prefering:
>
> > static void
> > foo (void)
> > {
> > }
>
> over
>
> > static void
> > foo ()
> > {
> > }
>
> other than that `the former is strict ISO C'. -Wmissing-prototypes gets
> grumpy if it sees the second form. I'd assume that the corresponding
> ARI check was added as a cheap -Wmissing-prototypes check.
Yep.
It's unfortunate that gcc doesn't treat the latter as an extension.
A whole mess o' code is going to get needlessly changed (and I'm
refering to far more than just gdb). Blech!
More information about the Gdb
mailing list