Re: more compile warnings

Поиск
Список
Период
Сортировка
От Jeroen T. Vermeulen
Тема Re: more compile warnings
Дата
Msg-id 20021207043511.GB13123@xs4all.nl
обсуждение исходный текст
Ответ на Re: more compile warnings  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
On Fri, Dec 06, 2002 at 11:16:30PM -0500, Bruce Momjian wrote:
> 
> I use:
> 
>   -Wall -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wcast-align
Some other useful ones are -pedantic -W -Wfloat-equal -Wshadow
-Wcast-qual -Wwrite-strings -Wconversion -Wsign-compare -Wsign-promo.


> You would think that would catch it.  My problem is that I am compiling
> with -O0, because I compile all day and I don't care about optimization.
> In this case, the -O3 is doing some optimization that catches the
> problem, while -O0 does not.  Interesting.  Even -O catches it.

Last time I checked (which was admittedly some time ago) all the
interesting analysis that could give you new warnings was done by -O;
-O2 mostly involves the back-end, and -O3 adds pretty much nothing
except aggressive inlining.  Which was more likely to trigger compiler
bugs at the time than to find anything in your code.


Jeroen



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: more compile warnings
Следующее
От: Florian Weimer
Дата:
Сообщение: Re: [PATCHES] Patch to make Turks happy.