From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix up misuse of "volatile" in contrib/xml2.
Date: Thu, 10 Jul 2025 12:55:25 +0900
Message-ID: <aG85rYItyT0PGr3j@paquier.xyz> (raw)
In-Reply-To: <1141878.1752076195@sss.pgh.pa.us>
References: <E1uZFQd-005Je7-1t@gemulon.postgresql.org>
<aG2qhGodemZfrxcn@paquier.xyz>
<1141878.1752076195@sss.pgh.pa.us>
On Wed, Jul 09, 2025 at 11:49:55AM -0400, Tom Lane wrote:
> Not sure. Yesterday I saw such warnings from arowana,
> boa, dhole, rhinoceros, and shelduck, eg
>
> arowana | 2025-07-08 04:54:18 | xpath.c:274:6: warning: 'workspace' may be used uninitialized in this function [-Wmaybe-uninitialized]
> arowana | 2025-07-08 04:54:18 | xpath.c:319:6: warning: 'workspace' may be used uninitialized in this function [-Wmaybe-uninitialized]
> arowana | 2025-07-08 04:54:18 | xpath.c:374:6: warning: 'workspace' may be used uninitialized in this function [-Wmaybe-uninitialized]
> arowana | 2025-07-08 04:54:18 | ../../src/include/postgres.h:329:2: warning: 'result' may be used uninitialized in this function [-Wmaybe-uninitialized]
>
> Didn't look to try to figure out what the common factor
> among these machines is, but I think all of them are somewhat
> dated, which is depressing. You'd hope that newer compilers
> are more likely to find such issues, not less likely.
They are all using some gcc 4.X flavor, most with -O2 but not all.
And -Wmaybe-uninitialized is included in my default switches with a
gcc 14, and there is nothing with several levels of optimizations
applied, up to -O3. :(
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz, tgl@sss.pgh.pa.us, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Fix up misuse of "volatile" in contrib/xml2.
In-Reply-To: <aG85rYItyT0PGr3j@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox