https://d.puremagic.com/issues/show_bug.cgi?id=11943
Summary: Emit warning for default initialized pointers Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bugzi...@digitalmars.com --- Comment #0 from Walter Bright <bugzi...@digitalmars.com> 2014-01-17 18:53:23 PST --- Consider: class C { ... } void foo() { C c; // warning: c is default initialized to null. If that is // intended, write it as C c = null; C d = null; // no warning int* p; // warning ... int* q = null; // no warning } Of course, this won't eliminate null pointers. But it would put a dent in the inadvertancy of them. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------