C and C++ could have non_nullable pointers, easily
C and C++ could have non_nullable pointers, easily
Posted Aug 21, 2009 7:27 UTC (Fri) by nix (subscriber, #2304)In reply to: C and C++ could have non_nullable pointers, easily by njs
Parent article: Null pointers, one month later
No improvement, more like. All it does is automates away the null checks
everyone should already be doing anyway, and replaces it with something
which is sufficiently automated that I can't see how it could provide
helpful output at runtime (unless it did a longjmp() or EH got added to C
or something).
everyone should already be doing anyway, and replaces it with something
which is sufficiently automated that I can't see how it could provide
helpful output at runtime (unless it did a longjmp() or EH got added to C
or something).
So at best it'd give you something like a dump of program state at the
time of the unintended NULL dereference: i.e., a core dump. The only
advantage is that the set of places you could get core dumps from might be
slightly smaller (at allocation, rather than at first dereference).
