From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kp1rT-0006mf-JU for qemu-devel@nongnu.org; Sun, 12 Oct 2008 10:23:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kp1rR-0006m5-6M for qemu-devel@nongnu.org; Sun, 12 Oct 2008 10:23:59 -0400 Received: from [199.232.76.173] (port=50636 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kp1rQ-0006ly-SJ for qemu-devel@nongnu.org; Sun, 12 Oct 2008 10:23:56 -0400 Received: from mail2.shareable.org ([80.68.89.115]:39832) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kp1rP-0001bY-Ts for qemu-devel@nongnu.org; Sun, 12 Oct 2008 10:23:56 -0400 Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from ) id 1Kp1rI-0004uE-Ut for qemu-devel@nongnu.org; Sun, 12 Oct 2008 15:23:48 +0100 Date: Sun, 12 Oct 2008 15:23:48 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [5466] Only use __builtin_* with GCC >= 3.4 Message-ID: <20081012142348.GA18814@shareable.org> References: <48F1EE9B.6040706@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48F1EE9B.6040706@redhat.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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