This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sim


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]