Hi, On 2022-06-02 13:24:28 +0900, Michael Paquier wrote: > 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.
To me fixing gcc 4.8 warnings feels like a fools errand, unless they're verbose enough to make compilation exceedingly verbose (e.g. warnings in a header). > > 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? FWIW, I found -Wclobber to be so buggy as to be pointless. I don't think it needs be volatile because it'll not be accessed if we error out? At least in the first instances in Justin's patch. Greetings, Andres Freund