Re: patch: Use pg_assume in jsonb_util.c to fix GCC 15 warnings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Dmitry Mityugov <d(dot)mityugov(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: patch: Use pg_assume in jsonb_util.c to fix GCC 15 warnings
Date: 2025-07-15 22:58:10
Message-ID: 1138043.1752620290@sss.pgh.pa.us
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Geoghegan <pg(at)bowt(dot)ie> writes:
> In the past, it was often necessary to work around MSVC's inability to
> see that a block containing elog(ERROR) doesn't actually need to
> initialize variables that'll never actually be used in code that comes
> after that block. We still have many "keep compiler quiet" variable
> initializations due to this.

> Is that still something that we need to worry about?

Good question. It's not very clear what set of compiler versions
people are still using, but maybe it'd be okay to stop worrying
about suppressing such warnings.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2025-07-15 23:05:13 Re: patch: Use pg_assume in jsonb_util.c to fix GCC 15 warnings
Previous Message Jack Ng 2025-07-15 22:52:01 RE: Changing shared_buffers without restart