flagging runtime null dereferencing
Nick Sabalausky
a at a.a
Fri Nov 14 14:55:02 PST 2008
"Steven Schveighoffer" <schveiguy at yahoo.com> wrote in message
news:gfkui3$228r$1 at digitalmars.com...
> In addition, I'd propose that the compiler does a static check to see if a
> null dereference definitely will happen. e.g:
>
> C c;
> c.method(); // should be a compile error.
>
> Ran into this again, and again, had to spend too much time finding it.
>
I would love to see this happen. Unfortunately, I'm guessing it would fall
under the same category as getting a compile-time error on a missing return,
that category being "Compile-time checks Walter doesn't want to implement
because getting it flagged in *all* cases would require really fancy
flow-control analysis".
More information about the Digitalmars-d
mailing list