Re: compiler warnings with gcc 4.8 and -Og - Mailing list pgsql-hackers

From Matthias van de Meent
Subject Re: compiler warnings with gcc 4.8 and -Og
Date
Msg-id CAEze2WiNZ4o9ae14RFe0Tw+VY1fV+7L=kbRTqNSBgP5LKSYijQ@mail.gmail.com
Whole thread Raw
In response to Re: compiler warnings with gcc 4.8 and -Og  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: compiler warnings with gcc 4.8 and -Og
List pgsql-hackers
On Thu, 2 Jun 2022, 07:10 Tom Lane, <tgl@sss.pgh.pa.us> wrote:
>
> Justin Pryzby <pryzby@telsasoft.com> writes:
> > forking: <20220302205058.GJ15744@telsasoft.com>: Re: Adding CI to our tree
> > On Wed, Mar 02, 2022 at 02:50:58PM -0600, Justin Pryzby wrote:
> >> BTW (regarding the last patch), I just noticed that -Og optimization can cause
> >> warnings with gcc-4.8.5-39.el7.x86_64.
>
> I'm a little dubious about whether -Og is a case we should pay special
> attention to?  Our standard optimization setting for gcc is -O2, and
> once you go away from that there are any number of weird cases that
> may or may not produce warnings.  I'm not entirely willing to buy
> the proposition that we must suppress warnings on
> any-random-gcc-version combined with any-random-options.

The "Developer FAQ" page on the wiki suggests that when you develop
with gcc that you use CFLAGS="-ggdb -Og -g3 -fno-omit-frame-pointer"
during development, so I'd hardly call -Og "any random option".

-Matthias



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers
Next
From: Tom Lane
Date:
Subject: Re: compiler warnings with gcc 4.8 and -Og