From: | "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Dann Corbit <DCorbit(at)connx(dot)com>, Joe Conway <mail(at)joeconway(dot)com>, rbt(at)zort(dot)ca, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: more compile warnings |
Date: | 2002-12-07 04:35:11 |
Message-ID: | 20021207043511.GB13123@xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Horacio Miranda | 2002-12-07 04:53:58 | about store Large file. |
Previous Message | Bruce Momjian | 2002-12-07 04:16:30 | Re: more compile warnings |