3 ms·
I agree it is impossible in the general case (it's obviously impossible when input data controls program flow, for example). But I don't think that has much mea
by gcp 15y ago
I agree it is impossible in the general case (it's obviously impossible when input data controls program flow, for example). But I don't think that has much meaning for the benchmarks under consideration, which, by the way, one would expect to sidestep the obvious pitfalls here.
The impossibility of solving aliasing in the general case doesn't stop C compiler writers from implementing alias analysis.
- shasta 15y agoI assume xyzzyz was referring to the undecidability of the halting problem, not just user input. Comparisons to the halting problem are often made inappropriately, as would be the case here, since the compiler doesn't need to answer whether an arbitrary program contains aliasing, but only identify programs that admit arguments (often simple ones) demonstrating that they don't alias. It's still undecidable, though.