struct Base { void print(void) {}};struct Derived : Base { void print(void) { Base:print(); }};int main(int, char **) { Derived d; d.print(); return 0;}
Here Derived::print() wants to call the Base::print() function as part of its implementation. Unfortunately, this doesn't call Base::print(). Base: here is treated as a label before a recursive call to Derived::print() which causes a nice happy stack overflow.
On the plus side, this didn't show up in any actual production code. On the down side, it did show up in the sample exam questions the publisher supplied for a beginner's C++ book. You'd think that for a question along the lines of "what does this code snippet do" that someone would have actually tried compiling and running the code before deciding on an answer.
Which will promptly tell you "left of .x must be a struct/class/union". Guess what? The empty constructor of the stack-allocated variable is treated as a forward declaration of a Fun-returning function with no arguments. This is amusing though, because adding one argument or more to the constructor will suddenly clear up the ambiguity and it will work as expected. [grin]