agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Postgres hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: pgsql: Sync our copy of the timezone library with IANA release tzcode20
Date: Fri, 19 Jul 2019 00:06:01 -0400
Message-ID: <31996.1563509161@sss.pgh.pa.us> (raw)
In-Reply-To: <20190719035347.GJ1859@paquier.xyz>
References: <E1hnsNp-0007u8-PD@gemulon.postgresql.org>
	<20190719035347.GJ1859@paquier.xyz>

Michael Paquier <michael@paquier.xyz> writes:
> This is causing a compilation warning on Windows:

>  src/timezone/zic.c(2401): warning C4804: '-' : unsafe use of type
>   'bool' in operation

Hmmm ... the code looks like

        bool        locut,
                    hicut;
        ...
        thistimecnt = -locut - hicut;

so I think your compiler has a point.  I shall complain to upstream.
At best, it's really unobvious what this code is meant to do, and
at worst (eg, depending on whether bool promotes to signed or unsigned
int) the results are unportable.

			regards, tom lane





view thread (104+ messages)  latest in thread

Message-ID: <31996.1563509161@sss.pgh.pa.us>
Permalink:  ../31996.1563509161@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/31996.1563509161@sss.pgh.pa.us

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, pgsql-hackers@lists.postgresql.org
  Subject: Re: pgsql: Sync our copy of the timezone library with IANA release tzcode20
  In-Reply-To: <31996.1563509161@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox