pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Erik Rijkers <er@xs4all.nl>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: gcc 12.1.0 warning
Date: Fri, 06 May 2022 10:46:20 -0400
Message-ID: <2891033.1651848380@sss.pgh.pa.us> (raw)
In-Reply-To: <a74a1a0d-0fd2-3649-5224-4f754e8f91aa@xs4all.nl>
References: <a74a1a0d-0fd2-3649-5224-4f754e8f91aa@xs4all.nl>

Erik Rijkers <er@xs4all.nl> writes:
> Not sure if these compiler-mutterings are worth reporting but I guess 
> we're trying to get a silent compile.

> System: Debian 4.9.303-1 (2022-03-07) x86_64 GNU/Linux
> Compiling with gcc 12.1.0 causes the below 'warning' and 'note'.
> Compiling with --enable-cassert --enable-debug  is silent, no warnings)

> In function ‘guc_var_compare’,
>      inlined from ‘bsearch’ at 
> /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h:33:23,
>      inlined from ‘find_option’ at guc.c:5649:35:
> guc.c:5736:38: warning: array subscript ‘const struct config_generic[0]’ 
> is partly outside array bounds of ‘const char[8]’ [-Warray-bounds]
>   5736 |         return guc_name_compare(confa->name, confb->name);
>        |                                 ~~~~~^~~~~~

I'd call that a compiler bug.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <2891033.1651848380@sss.pgh.pa.us>
Permalink:  ../2891033.1651848380@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2891033.1651848380@sss.pgh.pa.us

 · 

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: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, er@xs4all.nl, pgsql-hackers@lists.postgresql.org
  Subject: Re: gcc 12.1.0 warning
  In-Reply-To: <2891033.1651848380@sss.pgh.pa.us>

* 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