Michael N. Moran - Re: Null pointer check elimination (original) (raw)
This is the mail archive of the gcc@gcc.gnu.orgmailing list for the GCC project.
"Michael N. Moran" mike@mnmoran.org writes:
| void buzz(Abc& b)
| {
| delete &b;
| }
| | void baz()
| {
| Abc& a = * new Abc();
If no memory is available, the new-expression throws an exception so the dereference never occurs. Check out C++ manuals.