Re: additional GCC warnings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: additional GCC warnings
Date
Msg-id 15908.1098064986@sss.pgh.pa.us
Whole thread Raw
In response to Re: additional GCC warnings  (Neil Conway <neilc@samurai.com>)
Responses Re: additional GCC warnings
List pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
>>> -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.

We've always used both.  See Makefile.global.in:

ifeq ($(GCC), yes) CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations
endif

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

Hmm, it looks like -Wmissing-prototypes may be a superset of
-Wmissing-declarations --- it seems to say that the latter will be
content with a K&R style declaration ("extern int foo();") but the
former will not.  If that's a correct reading then we could drop
-Wmissing-declarations.
        regards, tom lane


pgsql-hackers by date:

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