Skip to content

Comment on Undefined Behavior in C and C++parent

Comments

In order to make this example you showed me you were successfully able to reason about the output of the compiler despite using UB. You understood how things were defined differently for different optimization levels.

Being able to reason about a particular instance of a particular compiler on a specific undefined construct does not imply UB is defined generally.

I never said it is defined generally. I said that it eventually gets defined as in it may come down to the source code of a specific version of the compiler that defines the behavior.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.