|
|
|
|
|
by Negitivefrags
165 days ago
|
|
It’s not incorrect. The code says that if x is true then a=13 and if it is false than b=37. This is the case. Its just that a=13 even if x is false. A thing that the code had nothing to say about, and so the compiler is free to do. |
|
Practically speaking, I’d argue that a compiler assuming uninitialized stack or heap memory is always equal to some arbitrary convenient constant is obviously incorrect, actively harmful, and benefits no one.