(snip, previously I wrote)
I wasn't sure what you meant by "wrong", ...
The word "wrong" entered this discussion through your comments "I
noticed that they had this wrong", and "Using the C shift operators on
32 bit words got this wrong", so the key question is what "wrong" meant
to you in that context.
... but doing something
with undefined behavior, and expecting a specific behavior,
seems "wrong" to me.
I would basically agree with that statement - with limitations. In the
context of the C standard, "undefined behavior" means only that the
standard doesn't define the behavior; it does not prohibit other
documents from defining it, such as the compiler's documentation, and
there's nothing wrong with relying upon that's compiler's documentation
for code that's intended to be used only with that compiler.
However, the wrongness described by that statement doesn't seem
applicable to the S/360 emulator. In the context of that statement,
"expecting" is something that a developer does, not something that the
emulator does.
It would indeed be wrong for the developer of code that's intended to be
portable, to have any expectations about how a 32-bit C shift of a
32-bit integer is implemented; but that's precisely because there's no
wrong way for an implementation to implement it.