Re: gcc 13 warnings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: gcc 13 warnings
Date: 2023-03-17 14:26:20
Message-ID: 4169125.1679063180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com> writes:
> On 16.03.23 19:11, Andres Freund wrote:
>> So I just elected to leave it at the default for meson.

> AFAICT, the default for meson is buildtype=debug, which is -O0. The -O3
> comes from meson.build setting buildtype=release.

> I think a good compromise would be buildtype=debugoptimized, which is
> -O2 with debug symbols, which also sort of matches the default in the
> autoconf world.

That sounds promising.

> At least during the transition phase I would prefer having the same
> default optimization level in both build systems, mainly because of how
> this affects warnings.

I'd prefer sticking to -O2 mainly because of the risk of new bugs.
The meson conversion is a big enough job without adding "harden
Postgres against -O3" to the list of tasks that must be accomplished.
We can take that on in due time, but let's keep it separate.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Aleksander Alekseev 2023-03-17 14:29:04 Re: Commitfest 2023-03 starting tomorrow!
Previous Message Daniel Gustafsson 2023-03-17 14:08:11 Re: Making background psql nicer to use in tap tests