4 ms·
Well, in the most general case where x's value can only be determined at runtime, most any compiler can and will assume that the initial if could or could not b
by oldmanhorton 10y ago
Well, in the most general case where x's value can only be determined at runtime, most any compiler can and will assume that the initial if could or could not be hit and will therefore assume that y could, conservatively, be uninitialized. Its not uncomputable, its just conservative.
- mnarayan01 10y agoI mean it's undecidable even if x is computed from purely static values: `x` can be the result of an arbitrary C-function and C is Turing complete.
- nitrogen 10y agoIf x is a 32-bit int, then there are only ~4bil possible values to consider. If any of them not ruled out already would lead to an uninitialized read, issue a warning.