Timeline for Doesn't "always initialize variables" lead to important bugs being hidden?
Current License: CC BY-SA 3.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 22, 2020 at 1:26 | comment | added | Jordan Brown | Truly detecting used-before-set problems is indeed equivalent to the halting problem. And indeed it's sad when a compiler doesn't detect a used-before-set case. But that doesn't mean that it's not valuable to detect all of the cases that it can detect! If you initialize to NULL, say, there are tools that can detect some cases where you dereference that NULL, but that's much harder than detecting used-before-set. | |
| Dec 27, 2015 at 23:28 | comment | added | zwol | It is sad about gcc, but if you don't understand why the rest is relevant then you need to educate yourself. | |
| Dec 27, 2015 at 23:12 | comment | added | gnasher729 | What you say about gcc is just said. The rest is irrelevant. | |
| Dec 27, 2015 at 23:12 | history | edited | gnasher729 | CC BY-SA 3.0 |
added 643 characters in body
|
| Dec 27, 2015 at 18:45 | comment | added | zwol | This sounds superficially good, but relies too much on the accuracy of uninitialized-value warnings. Getting these perfectly correct is equivalent to the Halting Problem, and production compilers can and do suffer false negatives (i.e. they don't diagnose an uninitialized variable when they should have); see for instance GCC bug 18501, which has gone unfixed for more than ten years now. | |
| Dec 27, 2015 at 13:51 | history | answered | gnasher729 | CC BY-SA 3.0 |