top | item 39073463

(no title)

pardoned_turkey | 2 years ago

The author wasn't asking you to write code, but to analyze some existing snippets. And it wasn't about "intuition about how compilers work", because not all of these deal with undefined behavior. Some are merely unspecified - i.e., platform-dependent in a non-crazy way (example: big endian vs little endian). So the gotcha is that you made the reader assume you might be talking about a modern Intel or ARM CPU, but what you really meant is that the return value will be different on PDP-11. Frankly, seems pedantic.

discuss

order

Affric|2 years ago

It’s all pedantry until you are writing software for a 1970s nuclear power plant.

/s