[RESOLVED] Why is ((foo*)NULL)->bar(); undefined?
I've seen code to this effect appear twice on this forum in the last couple of days. Both times the response was that the result is undefined.
Code:
((foo*)NULL)->bar(); // where bar is not static or virtual
I've skimmed through the standard, but found nothing yet.
I'm intending printing off a copy and looking in more depth tonight.
My question:
Is the result undefined because the standard explicitly states that it is, or does the standard simply fail to address the issue?
Thanks very much for you time.
Signature
Please use: [ code ][/ code ] tags and reasonably correct tabbing. They really help us read your code
End Signature