Peter Eisentraut <[email protected]> writes:
> On 14.11.25 22:11, Tom Lane wrote:
>> "leapyear" is bool, and I believe these casts-to-int were put in to
>> suppress compiler bleats about up-casting that to int. This probably
>> dates from when we equated bool to char, and maybe it's moot now,
>> but I'm not sure.
> Correct, with bool as char this would have fallen afoul of
> -Wchar-subscripts, which is included in -Wall.
> I could remove these casts as a separate patch so that the reason can be
> documented more clearly.
Either that or just explain it in a para of the commit message.
>> Since we've dropped pre-C11 support, I wonder why we'd include this
>> upstream workaround for that.
> I figured it would be better to reduce divergences from upstream, even
> if we don't need all the code.
[ shrug... ] Okay.
No further comments.
regards, tom lane