From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41778) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSvBH-0007LL-Hr for qemu-devel@nongnu.org; Mon, 08 Feb 2016 18:25:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSvBD-0006Du-ED for qemu-devel@nongnu.org; Mon, 08 Feb 2016 18:25:19 -0500 Received: from mail-qk0-x22c.google.com ([2607:f8b0:400d:c09::22c]:36828) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSvBD-0006Dq-94 for qemu-devel@nongnu.org; Mon, 08 Feb 2016 18:25:15 -0500 Received: by mail-qk0-x22c.google.com with SMTP id s68so64662234qkh.3 for ; Mon, 08 Feb 2016 15:25:15 -0800 (PST) Sender: Richard Henderson References: <1454717370-17516-1-git-send-email-rth@twiddle.net> <56B8F994.9010904@twiddle.net> From: Richard Henderson Message-ID: <56B923D5.7010905@twiddle.net> Date: Tue, 9 Feb 2016 10:25:09 +1100 MIME-Version: 1.0 In-Reply-To: <56B8F994.9010904@twiddle.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PULL 00/12] TCG patch queue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers On 02/09/2016 07:24 AM, Richard Henderson wrote: > On 02/08/2016 10:25 PM, Peter Maydell wrote: >> Hi. This doesn't compile with clang, I'm afraid: >> >> /home/petmay01/linaro/qemu-for-merges/tcg/tcg.c:2048:30: error: >> comparison of constant 16 with expression of type 'TCGReg' is always >> true [-Werror,-Wtautological-constant-out-of-range-compare] >> for(reg = 0; reg < TCG_TARGET_NB_REGS; reg++) { >> ~~~ ^ ~~~~~~~~~~~~~~~~~~ > > Good grief. This is C, not C++. In C it isn't legal to reduce the width of > the underlying type of the enum to the minimum width that contains the > enumerators -- the underlying type must still be int or unsigned int. Thus reg > must be able to hold the value 16 (or 1000 for that matter). > > IMO this is a clang bug. I'm glad they agree: https://llvm.org/bugs/show_bug.cgi?id=16154 What clang version are you using, Peter? r~