Comment

Comment by MaxBarraclough

Does the following code fragment cause undefined behaviour?

    unsigned int x;
    x -= x;
 
There's a lengthy StackOverflow thread where various C language-lawyers disagree on what the spec has to say about trap values, and under what circumstances reading an uninitialised variable causes UB. I'd appreciate an authoritative answer. Thanks for dropping by on HN!

https://stackoverflow.com/q/11962457/

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton