qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	qemu-devel@nongnu.org
Cc: Igor Mammedov <imammedo@redhat.com>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PULL v2 05/13] target/rx: CPU definitions
Date: Fri, 20 Mar 2020 09:18:32 -0700	[thread overview]
Message-ID: <e4bc22f6-128d-99e9-9359-3253f666c065@linaro.org> (raw)
In-Reply-To: <c7cf4bab-b9ac-4387-0709-a02c04b24061@redhat.com>

On 3/20/20 9:04 AM, Philippe Mathieu-Daudé wrote:
> Not related to this patch, but this line generates a warning with Clang:
> 
>   CC      rx-softmmu/target/rx/cpu.o
> target/rx/cpu.c:158:33: warning: The result of the left shift is undefined
> because the left operand is negative
>     address = physical = addr & TARGET_PAGE_MASK;
>                                 ^~~~~~~~~~~~~~~~
> include/exec/cpu-all.h:234:45: note: expanded from macro 'TARGET_PAGE_MASK'
> #define TARGET_PAGE_MASK   ((target_long)-1 << TARGET_PAGE_BITS)
>                             ~~~~~~~~~~~~~~~ ^
> 1 warning generated.

>From configure:

> # We use -fwrapv to tell the compiler that we require a C dialect where
> # left shift of signed integers is well defined and has the expected
> # 2s-complement style results. (Both clang and gcc agree that it
> # provides these semantics.)

Clang is *supposed* to be not generating those warnings.


r~


  reply	other threads:[~2020-03-20 16:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-20 10:35 [PULL v2 00/13] target: Add the Renesas RX architecture Philippe Mathieu-Daudé
2020-03-20 10:35 ` [PULL v2 05/13] target/rx: CPU definitions Philippe Mathieu-Daudé
2020-03-20 16:04   ` Philippe Mathieu-Daudé
2020-03-20 16:18     ` Richard Henderson [this message]
2020-03-20 16:21       ` Peter Maydell
2020-03-20 16:32         ` Philippe Mathieu-Daudé
2020-03-20 16:37           ` Peter Maydell
2020-03-21 11:05             ` Philippe Mathieu-Daudé
2020-03-21 11:17               ` Philippe Mathieu-Daudé
2020-03-20 13:53 ` [PULL v2 00/13] target: Add the Renesas RX architecture 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=e4bc22f6-128d-99e9-9359-3253f666c065@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=f4bug@amsat.org \
    --cc=imammedo@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=ysato@users.sourceforge.jp \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).