Should we warn if we detect null derefernces or void value uses ?
Stefan Koch via Digitalmars-d
digitalmars-d at puremagic.com
Sun Dec 4 20:41:55 PST 2016
Hi Guys,
What is your opinion, should we warn if we unambiguously detect
something that is clearly unwanted ?
int fn(int y)
{
int x = void;
++x;
return x+y;
}
This requires data-flow analysis (The same kind that tells you
if you are skipping a statement)
And will slow down compilation a little if we enable such a
warning.
More information about the Digitalmars-d
mailing list