logoalt Hacker News

orangepandatoday at 5:03 PM2 repliesview on HN

How could it be defined behaviour, when the result is different on ARM and x86?


Replies

marcosdumaytoday at 5:06 PM

Architecture dependent is not the same as undefined.

show 1 reply
cataphracttoday at 5:31 PM

Undefined behavior is not the same as implementation-defined or unspecified behavior. A program with undefined behavior is by definition an incorrect program. But there are cases where the spec actually gives some margin to the implementation. Programs relying on the choices of the implementation may be correct, even if non-portable.

show 1 reply