This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: sim
- From: Alan Modra <amodra at gmail dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Binutils <binutils at sourceware dot org>, gdb at sourceware dot org
- Date: Thu, 11 Feb 2016 13:47:11 +1030
- Subject: Re: sim
- Authentication-results: sourceware.org; auth=none
- References: <D1AA69AC-E460-42A3-8E4F-EC1EF061717C at comcast dot net>
On Wed, Feb 10, 2016 at 06:16:24PM -0800, Mike Stump wrote:
> I imported master, and got a few warnings:
>
> ./../../binutils/sim/cyclops1/../common/sim-profile.c: In function âprofile_pc_initâ:
> ../../../binutils/sim/cyclops1/../common/sim-profile.c:566:4: warning: left shift count >= width of type [enabled by default]
> ((1 << sizeof (sim_cia) * (8 - 1))
> ^
Hmm, that looks like wrong parens too. The shift count is probably
supposed to be (sizeof (sim_cia) * 8 - 1).
> ../../../binutils/sim/cyclops1/../common/sim-profile.c:585:3: warning: left shift count >= width of type [enabled by default]
> bucket_size = ((1 << ((sizeof (sim_cia) * 8) - 1))
> ^
>
> Possibly 1L might work better.
Yes, and possibly better reported to gdb. :)
--
Alan Modra
Australia Development Lab, IBM