Re: Is PG built on any C compilers where int division floors?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Is PG built on any C compilers where int division floors?
Date: 2018-06-25 03:38:03
Message-ID: 21233.1529897883@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Chapman Flack <chap(at)anastigmatix(dot)net> writes:
> C99 finally pinned down what / does on signed ints, truncating toward zero.
> Before that, it could truncate toward zero, or floor toward -inf.
> Is PostgreSQL built on any compilers/platforms that have the floor
> behavior?

I'm not sure if we still have any buildfarm animals that act that way[1],
but the project policy is that we target C90 not C99. So wiring in any
assumptions about this would seem to be contrary to policy.

regards, tom lane

[1] gaur/pademelon might, but it's turned off and 300 miles away, so
I can't check right now.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-06-25 03:41:41 Re: effect of JIT tuple deform?
Previous Message Pavel Stehule 2018-06-25 03:32:37 Re: effect of JIT tuple deform?