3 ms·
I pretty sure halting problem reduces to figuring out code reordering and optimization like that. We cannot solve it exhaustively, so instead we do the next bes
by hvidgaard 11y ago
I pretty sure halting problem reduces to figuring out code reordering and optimization like that. We cannot solve it exhaustively, so instead we do the next best thing, approximate and provide a common case. I agree that it's not optimal, but it's the best we can do.
- adrianN 11y agoObviously it's impossible to perfectly optimize every time. I would just like some more diagnostics from the compiler that help me debug issues with wrong of missing optimizations.
- semi-extrinsic 11y agogcc has a flag "-Wuninitialized" that warns about possible use of an uninitialised variable. It frequently yields false positives, because it's an approximation; a general "detect all uninitialized variables" algorithm can solve the halting problem. http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings