This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Fwd: [PATCH, libgcc]: Avoid "left shift count >= width of type" warnings in soft-fp code


On Tue, 26 Nov 2013, Uros Bizjak wrote:

> On Tue, Nov 26, 2013 at 12:31 AM, Joseph S. Myers
> <joseph@codesourcery.com> wrote:
> > I don't see why the op-2.h change should be needed - the code with the
> > problem shift is already inside the "else" part of a ((rsize <=
> > _FP_W_TYPE_SIZE) ? : ...) conditional, and the reason ?: is used here
> > instead of if/else is exactly to avoid such warnings; putting in a second
> > nested such conditional with the same condition shouldn't make any
> > difference.
> 
> You are right. I have added op-2.h mechanically, following op-4.h change.
> 
> Attached patch also compiles gcc soft-fp without problems for x86_64
> 64bit and 32bit multilibs, so the build exercises op-4.h as well as
> op-2.h headers.
> 
> Re-tested on x86_64 multilib gcc bootstrap and regression test.
> 
> 2013-11-25  Uros Bizjak  <ubizjak@gmail.com>
> 
>     * soft-fp/op-4.h (_FP_FRAC_ASSEMBLE_4): Check rsize against
>     _FP_W_TYPE_SIZE to avoid "left shift count >= width of type" warning.

Thanks, committed.

-- 
Joseph S. Myers
joseph@codesourcery.com


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