Re: [HACKERS] additional GCC warnings

2004-10-18 Thread Peter Eisentraut
Jeroen T. Vermeulen wrote: > IIRC it's a new feature in C99. If that is the case, you may want to > tell gcc simply to compile an older C dialect and get errors for all > such newfangled code. We make occasional, optional use of C99 features, so we don't want to turn it off completely. -- Pete

Re: [HACKERS] additional GCC warnings

2004-10-18 Thread Jeroen T. Vermeulen
On Sun, Oct 17, 2004 at 01:50:46PM -0400, Tom Lane wrote: > > -Wdeclaration-after-statement (Recent versions of GCC allow declarations > > and statements to be intermixed in C; enabling this flag would enforce > > the current convention of avoiding this style.) > > Ick. If the default is to a

Re: [HACKERS] additional GCC warnings

2004-10-17 Thread Neil Conway
On Mon, 2004-10-18 at 12:03, Tom Lane wrote: > > We've always used -Wmissing-prototypes. > > We've always used both. My apologies -- I don't know where I got the opposite impression. > Hmm, it looks like -Wmissing-prototypes may be a superset of > -Wmissing-declarations --- it seems to say that

Re: [HACKERS] additional GCC warnings

2004-10-17 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> 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)

Re: [HACKERS] additional GCC warnings

2004-10-17 Thread Neil Conway
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:

Re: [HACKERS] additional GCC warnings

2004-10-17 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > Recent versions of GCC support some additional warning flags that I > think would be useful to enable for building PostgreSQL: > -Wmissing-declarations ("Warn if a global function is defined without a > previous declaration.") Hm? We have always used t

[HACKERS] additional GCC warnings

2004-10-17 Thread Neil Conway
Recent versions of GCC support some additional warning flags that I think would be useful to enable for building PostgreSQL: -Wmissing-declarations ("Warn if a global function is defined without a previous declaration.") -Wdeclaration-after-statement (Recent versions of GCC allow declarations