Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: gorcom2012(at)gmail(dot)com, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()
Date: 2025-07-21 14:29:32
Message-ID: aH5OzOYbypP8QFKv@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Jul 21, 2025 at 12:29:16PM +0000, PG Bug reporting form wrote:
> In pg_next_dst_boundary() (src/timezone/localtime.c), the following
> condition can never be true:
> ```
> if (tcycles - icycles >= 1 || icycles - tcycles >= 1)
> return -1;
> ```
> This is unreachable because icycles is assigned directly from tcycles.

I see the following upstream commit and discussion related to this:

https://github.com/eggert/tz/commit/b0bf6d8
https://mm.icann.org/pipermail/tz/2013-August/019493.html

--
nathan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2025-07-21 14:38:26 Re: BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()
Previous Message PG Bug reporting form 2025-07-21 12:29:16 BUG #18993: [BUG] Unreachable code in pg_next_dst_boundary()