Re: additional GCC warnings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: additional GCC warnings
Date: 2004-10-18 02:03:06
Message-ID: 15908.1098064986@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Neil Conway <neilc(at)samurai(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Neil Conway 2004-10-18 03:01:15 Re: additional GCC warnings
Previous Message Tom Lane 2004-10-18 01:53:43 Re: spinlocks: generalizing "non-locking test"