Received: from eggs.gnu.org ([2001:4830:134:3::10]:52951) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biSE1-0001WB-CW for qemu-devel@nongnu.org; Fri, 09 Sep 2016 16:16:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1biSDw-0002GY-DZ for qemu-devel@nongnu.org; Fri, 09 Sep 2016 16:16:36 -0400 Received: from mail-yb0-x242.google.com ([2607:f8b0:4002:c09::242]:34381) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1biSDw-0002GO-7v for qemu-devel@nongnu.org; Fri, 09 Sep 2016 16:16:32 -0400 Received: by mail-yb0-x242.google.com with SMTP id 79so64184ybe.1 for ; Fri, 09 Sep 2016 13:16:32 -0700 (PDT) Sender: Richard Henderson References: <1472935202-3342-1-git-send-email-rth@twiddle.net> <1472935202-3342-6-git-send-email-rth@twiddle.net> <20160909130110.GA24307@hhmipssw201.hh.imgtec.org> From: Richard Henderson Message-ID: <4610e9c4-8e3e-74ef-1ae6-bbc2a0bd2c36@twiddle.net> Date: Fri, 9 Sep 2016 13:16:26 -0700 MIME-Version: 1.0 In-Reply-To: <20160909130110.GA24307@hhmipssw201.hh.imgtec.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 05/34] int128: Add int128_make128 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leon Alrae Cc: "qemu-devel@nongnu.org" On 09/09/2016 06:01 AM, Leon Alrae wrote: > This causes build failures for me on CentOS6.5: > /user/lea/dev/qemu/include/qemu/int128.h:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Int128’ > /user/lea/dev/qemu/include/qemu/int128.h:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int128_make64’ > /user/lea/dev/qemu/include/qemu/int128.h:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int128_make128’ > (...) > > This is because CONFIG_INT128 is set if test for __int128_t succeeds, not > __int128. The following change on top of patches 4 and 5 in this series > fixes the problem for me: > > diff --git a/include/qemu/int128.h b/include/qemu/int128.h > index 261b55f..5c9890d 100644 > --- a/include/qemu/int128.h > +++ b/include/qemu/int128.h > @@ -4,7 +4,7 @@ > #ifdef CONFIG_INT128 > #include "qemu/bswap.h" > > -typedef __int128 Int128; > +typedef __int128_t Int128; > > static inline Int128 int128_make64(uint64_t a) > { > @@ -13,7 +13,7 @@ static inline Int128 int128_make64(uint64_t a) > > static inline Int128 int128_make128(uint64_t lo, uint64_t hi) > { > - return (unsigned __int128)hi << 64 | lo; > + return (__uint128_t)hi << 64 | lo; > } Thanks, I'll fold that in. r~