Re: additional GCC warnings - Mailing list pgsql-hackers

From Neil Conway
Subject Re: additional GCC warnings
Date
Msg-id 1098062556.22986.116.camel@localhost.localdomain
Whole thread Raw
In response to Re: additional GCC warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: additional GCC warnings
List pgsql-hackers
On Mon, 2004-10-18 at 03:50, Tom Lane wrote:
> > -Wmissing-declarations ("Warn if a global function is defined without a 
> > previous declaration.")
> 
> Hm?  We have always used that one.

We've always used -Wmissing-prototypes. The documentation states that
-Wmissing-prototypes instructs GCC to:
       Warn if a global function is defined without a previous       prototype declaration. This warning is issued even
ifthe       definition itself provides a prototype. The aim is to detect       global functions that fail to be
declaredin header files.       
 
Whereas -Wmissing-declarations does:
       Warn if a global function is defined without a previous       declaration. Do so even if the definition itself
providesa       prototype. Use this option to detect global functions that are       not declared in header files.
 

Which doesn't make the difference in behavior between the two options
clear to me. Can anyone clarify this?

BTW, are these changes appropriate for 8.0?

-Neil




pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: spinlocks: generalizing "non-locking test"
Next
From: Tom Lane
Date:
Subject: Re: spinlocks: generalizing "non-locking test"