Re: additional GCC warning flags

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: additional GCC warning flags
Date: 2004-10-25 03:03:21
Message-ID: 200410250303.i9P33L112049@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Neil Conway wrote:
> On Wed, 2004-10-20 at 02:07, Tom Lane wrote:
> > Looks reasonable to me. Just one comment: should the
> > -fno-strict-aliasing probe be inside the "if test "$GCC" = yes" part?
> > It effectively was in the original.
>
> Yeah, makes sense. Patch applied with this fix and Peter's suggested
> improvement to a comment.
>
> > > BTW, since we're on the topic of compiler options, is there a reason we
> > > don't use -g3 with GCC when --enable-debug is specified? It seems worth
> > > using to me.
> >
> > How much does it bloat the executable?
>
> Quite a bit, as it turns out: with CFLAGS="-O2 -g, "postgres" is 7077111
> bytes. With CFLAGS="-O2 -g3", "postgres" is 51227279 bytes. So there is
> quite an increase -- I guess we had better stick with -g then.

Yes, stay with -g. As I remember the more verbose -g information isn't
usable by most debug tools anyway.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Neil Conway 2004-10-25 04:27:51 (yet) more pfree cast cleanup
Previous Message Bruce Momjian 2004-10-25 02:58:01 Re: Where is the link to cygwin?