Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Undefined behavior in C is a reading error. Parent comment
It dereferences a null pointer, invoking undefined behaviour, then calls the function `use` with the resulting value.
> what should the compiler emit?
Probably something to the effect of:
ld r0 [sp+.p] # if p is not already in a register ld r0 [r0] # *p jsr use
ld r0 [sp+.p] # if p is not already in a register jz r0 .panic ld r0 [r0] # *p jsr use
There are no comments on this comment yet.
It dereferences a null pointer, invoking undefined behaviour, then calls the function `use` with the resulting value.
> what should the compiler emit?
Probably something to the effect of:
but it would be fine to emit something like: because the jz can only be taken when undefined behaviour happens.