Hi Michael,

This idiom also appears in newlib and in various versions of GDB and
associated codebases. I'm not sure how this maps to actual development
repos.

Well GDB shares a repo with the binutils, but newlib has its own repo.

All forms I found are one of the following source text snippets:

(m = 1; m != 0; m <<= 1)

(i = 1; i; i <<= 1)

If you grep for that, you may find more. Of course, it's only a bug if
the variable is signed.


I checked, but could not find any other places in the binutils sources where 
this kind of expression appears.  (With a signed variable that is).

I found one place in the GDB sources where bug appears to be real: 
sim/common/cgen-scache,c: scache_option_handler().  So I will submit a bug 
report about that.

I am not a newlib expert, so I have left those sources alone.

Cheers
  Nick


_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to