Comment

Comment by jylam

> Turning on the so-called “optimizer” breaks this code because current C “optimizers” bizarrely enough can change the semantics of C code in often unpredictable ways without making any performance improvements. This is permitted by the C Standard for reasons that strike me as not well thought out, but let’s pass over this sad situation for the moment.

the C Standard has a thing called "undefined behavior", and this person is running right into it with their invalid pointer arithmetic. So the result is undefined, and could be anything, including embedding the Doom source code.

parent jylam 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton