This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB 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]

int foo (); vs int foo (void);


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!


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