Re: Debian 12 gcc warning

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Debian 12 gcc warning
Дата
Msg-id ZO3yO5qiW9A82zo4@momjian.us
обсуждение исходный текст
Ответ на Re: Debian 12 gcc warning  (John Naylor <john.naylor@enterprisedb.com>)
Ответы Re: Debian 12 gcc warning  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Aug 29, 2023 at 10:26:27AM +0700, John Naylor wrote:
> 
> On Tue, Aug 29, 2023 at 6:56 AM David Rowley <dgrowleyml@gmail.com> wrote:
> >
> > I'm just not sure if it's unable to figure out if at least nargs
> > elements is set or if it won't be happy until all 100 elements are
> > set.
> 
> 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.

I think the question is whether we add this to silence a common compiler
but non-default optimization level.  It is the only such case in our
source code right now.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Melanie Plageman
Дата:
Сообщение: Re: Eliminate redundant tuple visibility check in vacuum
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: logical_replication_mode