>>6
Because printing "Segmentation fault" to stderr and returning 139 is the default behaviour on some *nix'es. In other OSes, the behaviour will vary. For example, in Windows, it'll invoke the SEH, then VEH (or other handlers), if those can't handle the access violation error, it will call UnhandledExceptionFilter, which can also be set by the user, but if it's not, it will then display an error or not do anything (depending on settings), or if you have a JIT debugger set, it will launch the debugger neatly allowing you to see what caused the application crash. Other OSes have different ways of handling it as well.
The point is that your program tries to create the illusion that a segmentation fault happened, and this illusion would only work in OSes which actually display such errors and return with that error code. Since this will only produce the required effect in some OSes, it's not portable in the truest sense as while the code is portable, the behavior is not the expected one. Instead, you should generate a real segmentation fault which will give consistent behavior across a wider range of OSes. The problem with generating a real segmentation fault is that you need to know which area of memory is protected (if you're even in an OS which has such a thing, for example you can't cause a segmentation fault/access violation in an application running in x86 real mode (such as DOS), or in various microcontrollers).