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 that one.

> -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 allow that, then yes we need a warning.
I'd be fairly annoyed if it's not an error, in fact.

> Since some of these flags were added to GCC relatively recently, we 
> would probably need to test if the local gcc supports the flags via 
> configure.

Yeah, you would: it looks like gcc treats an unrecognized -W option
as an error:

$ gcc -Wabc z.c
cc1: Invalid option `-Wabc'
$ echo $?
1
$

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to