Re: Update timezone to C99 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Update timezone to C99
Date
Msg-id 1462381.1763567286@sss.pgh.pa.us
Whole thread Raw
In response to Re: Update timezone to C99  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
Peter Eisentraut <peter@eisentraut.org> 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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: PRI?64 vs Visual Studio (2022)
Next
From: Ilia Evdokimov
Date:
Subject: Re: Use merge-based matching for MCVs in eqjoinsel