Re: additional GCC warnings

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: additional GCC warnings
Date: 2004-10-18 01:22:36
Message-ID: 1098062556.22986.116.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 if the
definition itself provides a prototype. The aim is to detect
global functions that fail to be declared in header files.

Whereas -Wmissing-declarations does:

Warn if a global function is defined without a previous
declaration. Do so even if the definition itself provides a
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

In response to

Responses

Browse pgsql-hackers by date

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