Re: Patches applied; initdb time! - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patches applied; initdb time!
Date
Msg-id 27608.1019427065@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patches applied; initdb time!  (Thomas Lockhart <thomas@fourpalms.org>)
List pgsql-hackers
Thomas Lockhart <thomas@fourpalms.org> writes:
> But I do override some parameters in my Makefile.custom:
> CFLAGS+= -g -O0 -DUSE_ASSERT_CHECKING
>> If you use -O0 then you miss most of the interesting warnings.

> ?? Not in this case. afaik -O0 suppresses most optimizations

In particular, you don't get "unused variable" and "variable may not
have been set before being used" warnings at -O0, because the
control-flow analysis needed to emit those warnings is not done at -O0.

I generally use -O1 for development; it's sometimes a little hairy
stepping through the generated code, but usually gcc works well enough
at -O1, and I get the important warnings.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Coster/planner and edge cases...
Next
From: Tom Lane
Date:
Subject: Re: GUC vs variable.c (was Patches applied...)