3 ms·
You are correct that it is undecidable if do_something is from another object file (even then there can be some linker magic). But the vastly more common case
by CoolGuySteve 10y ago
You are correct that it is undecidable if do_something is from another object file (even then there can be some linker magic).
But the vastly more common case is uninitialized usage in the same compilation unit and I argue that that case should give a warning.
- gliese1337 10y agoEven when proving an uninitialized read is undecidable, it is still possible to note that a particular bit of code contains a path which could lead to an uninitialized read, or that it is is impossible to prove that an uninitialized read doesn't happen, in which case a warning is still likely to be appropriate.