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