public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bruce Momjian <[email protected]>
To: Tom Lane <[email protected]>
Cc: John Naylor <[email protected]>
Cc: David Rowley <[email protected]>
Cc: PostgreSQL-development <[email protected]>
Subject: Re: Debian 12 gcc warning
Date: Tue, 29 Aug 2023 22:52:06 -0400
Message-ID: <ZO6u1hySX4lBI/[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<CAApHDvosmrsBB=vJDEwxsAJhdrLXvT-JTPOHw3DG+ERv0w-M7Q@mail.gmail.com>
	<CAFBsxsFbNiq-S9VyBmon7J43q_pkSBgyCqWnhwj=Get51jfcAA@mail.gmail.com>
	<[email protected]>
	<[email protected]>

On Tue, Aug 29, 2023 at 10:18:36AM -0400, Tom Lane wrote:
> Bruce Momjian <[email protected]> writes:
> > On Tue, Aug 29, 2023 at 10:26:27AM +0700, John Naylor wrote:
> >> It looks like the former, since I can silence it on gcc 13 / -O1 by doing:
> >> /* keep compiler quiet */
> >> actual_arg_types[0] = InvalidOid;
> 
> > Agreed, that fixes it for me too.  In fact, assigning to only element 99 or
> > 200 also prevents the warning, and considering the array is defined for
> > 100 elements, the fact is accepts 200 isn't a good thing.  Patch attached.
> 
> That seems like a pretty clear compiler bug, particularly since it just
> appears in this one version.  Rather than contorting our code, I'd
> suggest filing a gcc bug.

I assume I have to create a test case to report this to the gcc team.  I
tried to create such a test case on gcc 12 but it doesn't generate the
warning.  Attached is my attempt.  Any ideas?  I assume we can't just
tell them to download our software and compile it.

-- 
  Bruce Momjian  <[email protected]>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.


Attachments:

  [application/zip] test_gcc_12.2.0-O1.zip (6.4K, ../ZO6u1hySX4lBI%[email protected]/2-test_gcc_12.2.0-O1.zip)
  download

view thread (8+ messages)  latest in thread

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]
  Subject: Re: Debian 12 gcc warning
  In-Reply-To: <ZO6u1hySX4lBI/[email protected]>

* 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