Re: compiler warnings with gcc 4.8 and -Og

2022-06-02 Thread Tom Lane
Andres Freund writes: > I tried to use -Og many times, but in the end mostly gave up, because it still > makes debugging harder compared to -O0. Yeah. My own habit is to build with -O2 normally. If I'm trying to debug some bit of code and find that I can't follow things adequately in gdb, I

Re: compiler warnings with gcc 4.8 and -Og

2022-06-02 Thread Andres Freund
Hi, On 2022-06-02 01:09:58 -0400, Tom Lane wrote: > Justin Pryzby writes: > > forking: <20220302205058.gj15...@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

Re: compiler warnings with gcc 4.8 and -Og

2022-06-02 Thread Andres Freund
Hi, On 2022-06-02 10:33:52 -0400, Tom Lane wrote: > Matthias van de Meent writes: > > On Thu, 2 Jun 2022, 07:10 Tom Lane, wrote: > >> I'm a little dubious about whether -Og is a case we should pay special > >> attention to? > > > The "Developer FAQ" page on the wiki suggests that when you

Re: compiler warnings with gcc 4.8 and -Og

2022-06-02 Thread Andres Freund
Hi, On 2022-06-02 13:24:28 +0900, Michael Paquier wrote: > On Wed, Jun 01, 2022 at 09:42:44PM -0500, Justin Pryzby wrote: > > Today's "warnings" thread suggests to me that these are worth fixing - it > > seems > > reasonable to compile postgres 14 on centos7 (as I sometimes have done), and > >

Re: compiler warnings with gcc 4.8 and -Og

2022-06-02 Thread Tom Lane
Matthias van de Meent writes: > On Thu, 2 Jun 2022, 07:10 Tom Lane, wrote: >> I'm a little dubious about whether -Og is a case we should pay special >> attention to? > The "Developer FAQ" page on the wiki suggests that when you develop > with gcc that you use CFLAGS="-ggdb -Og -g3

Re: compiler warnings with gcc 4.8 and -Og

2022-06-02 Thread Matthias van de Meent
On Thu, 2 Jun 2022, 07:10 Tom Lane, wrote: > > Justin Pryzby writes: > > forking: <20220302205058.gj15...@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 >

Re: compiler warnings with gcc 4.8 and -Og

2022-06-02 Thread Daniel Gustafsson
> On 2 Jun 2022, at 07:09, Tom Lane wrote: > 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

Re: compiler warnings with gcc 4.8 and -Og

2022-06-01 Thread Tom Lane
Justin Pryzby writes: > forking: <20220302205058.gj15...@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

Re: compiler warnings with gcc 4.8 and -Og

2022-06-01 Thread Michael Paquier
On Wed, Jun 01, 2022 at 09:42:44PM -0500, Justin Pryzby wrote: > Today's "warnings" thread suggests to me that these are worth fixing - it > seems > reasonable to compile postgres 14 on centos7 (as I sometimes have done), and > the patch seems even more reasonable when backpatched to older

compiler warnings with gcc 4.8 and -Og

2022-06-01 Thread Justin Pryzby
forking: <20220302205058.gj15...@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. > > be-fsstubs.c: In function