> I am puzzled, what exactly *does* C specify in this case? I reread
> the thread, but it's not clear what the requirement of the standard
> here is (as opposed to what programmers might or might not expect,
> or what hardware does or does not do).

It's undefined.  Traditional implementations either return zeros or
return the value obtained by taking the shift count modulo the size.
In the past, GCC would try to mimic the behavior of the vendor compiler
since few C programmers knew about this, though I think it's much less
of an issue today.

Reply via email to