2 ms·
The problem is that we don't know what the compiler might think.. If I write something along the lines of int& bar = *foo if(!foo) { // do something
by MiroF 8y ago
The problem is that we don't know what the compiler might think..
If I write something along the lines of
int& bar = *foo
if(!foo) {
// do something
}
The compiler very well might (and would be perfectly within its rights to) completely eliminate everything inside of the if(!foo) since it can assume the pointer is non-null because it is being dereferenced.