This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
int foo (); vs int foo (void);
- From: Doug Evans <dje at transmeta dot com>
- To: Andrew Cagney <ac131313 at redhat dot com>
- Cc: gdb at sources dot redhat dot com, rth at redhat dot com
- Date: Tue, 10 Jun 2003 12:17:47 -0700 (PDT)
- Subject: int foo (); vs int foo (void);
- References: <3EE62C3A.5000302@redhat.com>
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!