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: [patch] invalid error reports on v850-elf target/ppc-darwin host


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.

Cheers
  Nick



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