logoalt Hacker News

hmrytoday at 1:11 PM1 replyview on HN

Why is that missing the point? Loading it twice, possibly with different values, is the intended behavior. It's only undefined because the C spec doesn't specify the order of the loads (unlike most other languages which have a perfectly well-defined order for side effects in a single expression).


Replies

rowanG077today at 2:48 PM

What you are describing is implementation defined behavior. Using that is perfectly safe and reasonable. Undefined means this programs is malformed.

show 1 reply