[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [5466] Only use __builtin_* with GCC >= 3.4
From: |
Jamie Lokier |
Subject: |
Re: [Qemu-devel] [5466] Only use __builtin_* with GCC >= 3.4 |
Date: |
Sun, 12 Oct 2008 15:23:48 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
Avi Kivity wrote:
> >-#if defined(__GNUC__)
> >+#if defined(__GNUC__) && ((__GNUC__ > 3) || (__GNUC__ == 3 &&
> >__GNUC_MINOR__ >= 4))
>
> Couldn't this be wrapped in GCC_BUILTINS_AVAILABLE or GCC_ATLEAST_3_4?
> My eyes hurt.
Glibc uses "#if __GNUC_PREREQ (3,4)" which is quite neat.
Do "grep -R GNUC_PREREQ /usr/include".
I use (and define if not already defined) the same macro in my
programs, on the assumption that the macro's meaning is unlikely to
ever change or be different elsewhere.
-- Jamie