Re: pgsql: Use stdbool.h if suitable

From: Andres Freund <andres(at)anarazel(dot)de>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Use stdbool.h if suitable
Date: 2018-03-23 06:22:32
Message-ID: 20180323062232.hj2kokl54il72ool@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On 2018-03-22 18:25:01 -0700, Andres Freund wrote:
> Hi,
>
> On 2018-03-23 00:42:39 +0000, Peter Eisentraut wrote:
> > Use stdbool.h if suitable
> >
> > Using the standard bool type provided by C allows some recent compilers
> > and debuggers to give better diagnostics. Also, some extension code and
> > third-party headers are increasingly pulling in stdbool.h, so it's
> > probably saner if everyone uses the same definition.
>
> Hah. I was setting up LLVM buildfarm animals that run with LLVM
> assertions enabled, and was getting confused why they're failing after
> I'd run a check-world locally with assertions enabled.
>
> Turns out this broke it. I'll fix it. Just amazed that we've gone weeks
> without a change breaking my JIT work, and then within hours of it
> getting it got broken. Turns out LLVM represents a stdbool.h boolean as
> an i1 (int with 1 bit) rather than an i8 (int with 8 bits), which makes
> sense given the desired boolean behaviour (still takes 8 bits of
> storage).

Pushed a fix. There's now an array of llvm with assertion using
buildfarm animals. The one I was trying to setup, shows the before/after
now:
https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=xenodermus&br=HEAD

- Andres

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2018-03-23 12:43:37 pgsql: pg_resetwal: Add simple test suite
Previous Message Andres Freund 2018-03-23 05:36:22 pgsql: Adapt expression JIT to stdbool.h introduction.