Hi all,

Magnus Hagander wrote:
Personally, in my development tree I use a Makefile.custom containing

# back off optimization unless profiling
ifeq ($(PROFILE),)
   CFLAGS:= $(patsubst -O2,-O1,$(CFLAGS))

-O1 still generates "uninitialized variable" warnings but the code is a
lot saner to step through ... not perfect, but saner.  It's been a
workable compromise for a long time.  I don't recommend developing with
-O0, exactly because it disables some mighty valuable warnings.
Agreed.  I use -O1 by default myself, unless I am doing performance testing.

Something for the developers FAQ perhaps? I confess I did not know of
Makefile.custom :-D

I did not know, either, but would have been glad, had I found such info
a few weeks ago when I started digging into the pg source ;)

And while we are at it, how about some CFLAGS="-DOPTIMIZER_DEBUG"
sweetness for the debugging section in the Dev FAQ?

Are there any other macros that enable some more debug output? (Or is
there a place where all this has already been documented?)


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to