[patch] invalid error reports on v850-elf target/ppc-darwin host

Nick Clifton nickc@redhat.com
Fri Apr 25 16:07:00 GMT 2008

Hi Masaki,

> As you know, it is undefined in case bit shift with negative value.
> The result of (long)((1 << -1) - 1) is also undefined.

> This patch is fix assemble error caused by the behavior above.

Thank you for submitting this patch.

It is a good patch, but it does not go far enough.  Looking at the code 
there seems to be several other places where these shifts by negative 
values could occur, so we really should fix all of them.  Plus it would 
be very helpful if you could include a testcase that triggers the 
problem, so that we can make sure that it does not reoccur in the future.


More information about the Binutils mailing list