* int foo (); vs int foo (void);
@ 2003-06-10 19:06 Andrew Cagney
2003-06-10 19:17 ` Doug Evans
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Cagney @ 2003-06-10 19:06 UTC (permalink / raw)
To: gdb
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.
enjoy,
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
* int foo (); vs int foo (void);
2003-06-10 19:06 int foo (); vs int foo (void); Andrew Cagney
@ 2003-06-10 19:17 ` Doug Evans
0 siblings, 0 replies; 2+ messages in thread
From: Doug Evans @ 2003-06-10 19:17 UTC (permalink / raw)
To: Andrew Cagney; +Cc: gdb, rth
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!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-10 19:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-10 19:06 int foo (); vs int foo (void); Andrew Cagney
2003-06-10 19:17 ` Doug Evans
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).