Re: gcc 13 warnings

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Pavel Stehule <pavel.stehule@gmail.com>, Melanie Plageman <melanieplageman@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-03-29T07:51:19Z
Lists: pgsql-hackers
On 22.03.23 10:45, Peter Eisentraut wrote:
> On 18.03.23 00:54, Andres Freund wrote:
>>> 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.
>>
>> Looks like that'd result in a slightly worse build with msvc, as 
>> afaict we
>> wouldn't end up with /OPT:REF doesn't get specified, which 
>> automatically gets
>> disabled if /DEBUG is specified. I guess we can live with that.
> 
> I looked up what /OPT:REF does 
> (https://learn.microsoft.com/en-us/cpp/build/reference/opt-optimizations?view=msvc-170), and it seems pretty obscure to me, at least for development builds.

I have committed the change of buildtype to debugoptimized.



Commits

  1. Use pg_assume() to avoid compiler warning below exec_set_found()

  2. Add pg_assume(expr) macro

  3. meson: Change default buildtype to debugoptimized