Re: [RFC] Fix div/mul crash and more undefined behavior

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Xi Wang <xi(dot)wang(at)gmail(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [RFC] Fix div/mul crash and more undefined behavior
Date: 2012-11-19 17:17:36
Message-ID: 20121119171736.GB13889@awork2.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2012-11-19 11:04:31 -0500, Tom Lane wrote:
> Xi Wang <xi(dot)wang(at)gmail(dot)com> writes:
> > Since INTn_MIN and INTn_MAX are standard macros from the C library,
> > can we assume that every C compiler should provide them in stdint.h?
>
> Not every C compiler provides stdint.h, unfortunately --- otherwise
> I'd not be so resistant to depending on this.

We already have hardcoded values for INT64_MIN in numutils.c's
pg_lltoa(). Given that I think we could just bite the apple and provide
our own values if the platform doesn't provide them.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2012-11-19 17:22:45 Re: Enabling Checksums
Previous Message Kohei KaiGai 2012-11-19 17:07:30 Re: [v9.3] writable foreign tables