Re: [PATCH v2] Add bit operations util header - Mailing list pgsql-hackers

From Florian Weimer
Subject Re: [PATCH v2] Add bit operations util header
Date
Msg-id 82r5y11rfm.fsf@mid.bfk.de
Whole thread Raw
In response to Re: [PATCH v2] Add bit operations util header  (Jeremy Kerr <jk@ozlabs.org>)
Responses Re: [PATCH v2] Add bit operations util header  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
* Jeremy Kerr:

> Florian,
>
>> > +#if defined(__GNUC__) && \
>> > +    (defined(__ppc__) || defined(__powerpc__) || \
>> > +     defined(__ppc64__) || defined (__powerpc64__))
>>
>> If you require GCC anyway, you can use __builtin_clz instead.
>> (It's been available since GCC 4.1 at least.)
>
> Because now we have to test the compiler *and* the version as well?

This builtin is not architecture-specific, so you'd save the
architecture check.

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


pgsql-hackers by date:

Previous
From: Jeremy Kerr
Date:
Subject: Re: [PATCH v2] Add bit operations util header
Next
From: Florian Weimer
Date:
Subject: Re: Managing multiple branches in git