From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PULL 00/12] TCG patch queue
Date: Tue, 9 Feb 2016 07:24:52 +1100 [thread overview]
Message-ID: <56B8F994.9010904@twiddle.net> (raw)
In-Reply-To: <CAFEAcA9_H7jjYrTun1cR-KqzTmdiLySd3ZWzX3709umihSwesg@mail.gmail.com>
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 guess I'll rearrange this code so that it doesn't use the enum in the loop.
r~
next prev parent reply other threads:[~2016-02-08 20:25 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-06 0:09 [Qemu-devel] [PULL 00/12] TCG patch queue Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 01/12] tcg: Respect highwater in tcg_out_tb_finalize Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 02/12] tcg: Remove lingering references to gen_opc_buf Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 03/12] tcg: Change tcg_global_mem_new_* to take a TCGv_ptr Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 04/12] tcg: Change ts->mem_reg to ts->mem_base Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 05/12] tcg: Tidy temporary allocation Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 06/12] tcg: More use of TCGReg where appropriate Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 07/12] tcg: Remove tcg_get_arg_str_i32/64 Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 08/12] tcg: Change reg_to_temp to TCGTemp pointer Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 09/12] tcg: Change temp_dead argument to TCGTemp Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 10/12] tcg: Change temp_sync " Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 11/12] tcg: Change temp_save " Richard Henderson
2016-02-06 0:09 ` [Qemu-devel] [PULL 12/12] tcg: Introduce temp_load Richard Henderson
2016-02-08 11:25 ` [Qemu-devel] [PULL 00/12] TCG patch queue Peter Maydell
2016-02-08 20:24 ` Richard Henderson [this message]
2016-02-08 23:25 ` Richard Henderson
2016-02-09 9:24 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56B8F994.9010904@twiddle.net \
--to=rth@twiddle.net \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.