Re: compiler warnings with gcc 4.8 and -Og

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: compiler warnings with gcc 4.8 and -Og
Дата
Msg-id Ypg7fOeUmGarOHfN@paquier.xyz
обсуждение исходный текст
Ответ на compiler warnings with gcc 4.8 and -Og  (Justin Pryzby <pryzby@telsasoft.com>)
Ответы Re: compiler warnings with gcc 4.8 and -Og  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Wed, Jun 01, 2022 at 09:42:44PM -0500, Justin Pryzby wrote:
> Today's "warnings" thread suggests to me that these are worth fixing - it seems
> reasonable to compile postgres 14 on centos7 (as I sometimes have done), and
> the patch seems even more reasonable when backpatched to older versions.
> (Also, I wonder if there's any consideration to backpatch cirrus.yaml, which
> uses -Og)

https://en.wikipedia.org/wiki/CentOS#CentOS_releases tells that centos
7 will be supported until the end of 2024, so I would fix that.

> The patch below applies and fixes warnings back to v13.

I don't mind fixing what you have here, as a first step.  All those
cases are telling us that the compiler does not see PG_TRY() as
something is can rely on to set up each variable.  7292fd8 is
complaining about the same point, actually, aka setjmp clobberring the
variable, isn't it?  So wouldn't it be better to initialize them, as
your patch does, but also mark them as volatile?  In short, what
happens with -Wclobber and a non-optimized compilation?
--
Michael

Вложения

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: compiler warnings with gcc 4.8 and -Og
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Fix pg_upgrade test from v10