additional GCC warnings

Поиск
Список
Период
Сортировка
От Neil Conway
Тема additional GCC warnings
Дата
Msg-id 417263F8.4060102@samurai.com
обсуждение исходный текст
Ответы Re: additional GCC warnings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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 
and statements to be intermixed in C; enabling this flag would enforce 
the current convention of avoiding this style.)

-Wold-style-definition (Warn if K&R-style function definitions are used.)

For the most part it won't take a lot of work to enable these flags. 
Some code we imported into the tree from elsewhere might need to be 
updated for -Wold-style-definition, but that should be easy.

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.

Comments?

-Neil


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: Nearing final release?
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: 7.4 changes