public inbox for [email protected]  
help / color / mirror / Atom feed
From: Alexander Korotkov <[email protected]>
To: Andres Freund <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Bharath Rupireddy <[email protected]>
Cc: Alexander Korotkov <[email protected]>
Cc: [email protected]
Subject: Re: gcc build warnings at -O3
Date: Thu, 8 Feb 2024 22:00:56 +0200
Message-ID: <CAPpHfdvGGNSXae6V_PUFqpoF=sT7oE=RJu6jeeT_HvKXgtJkxQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<CALj2ACVQoFXxFm2kCmhHcdM7DjA84_bOjoM8HVAKHbE+KrZ1uA@mail.gmail.com>
	<[email protected]>
	<[email protected]>

On Wed, Feb 7, 2024 at 10:31 PM Andres Freund <[email protected]> wrote:
> On 2024-01-11 21:55:19 -0500, Tom Lane wrote:
> > Bharath Rupireddy <[email protected]> writes:
> > > Hi, I'm seeing a compiler warning with CFLAGS -O3 but not with -O2.
> >
> > > In file included from dbcommands.c:20:
> > > dbcommands.c: In function ‘createdb’:
> > > ../../../src/include/postgres.h:104:16: warning: ‘src_hasloginevt’ may
> > > be used uninitialized in this function [-Wmaybe-uninitialized]
> >
> > Hmm, I also see that at -O3 (not at -O2) when using Fedora 39's
> > gcc 13.2.1, but *not* when using RHEL8's gcc 8.5.0.
>
> It's visible here with gcc >= 10. That's enough versions that I think we
> should care.  Interestingly enough, it seems to have recently have gotten
> fixed in gcc master (14 to be).

I managed to reproduce this warning locally.  Fixed.

------
Regards,
Alexander Korotkov






view thread (5+ messages)

reply

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: gcc build warnings at -O3
  In-Reply-To: <CAPpHfdvGGNSXae6V_PUFqpoF=sT7oE=RJu6jeeT_HvKXgtJkxQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox