I didn't expect the code to run, hence my question. I tried it on OSX first which might have been the reason. Ran it on Ubuntu too and got the expected segmentationfault.
The code shouldn't even compile. But the segfault is OS dependent (as you discovered). Windows also will not segfault.
-Steve
