Does your compiler catchreturn *( (int *) 0);or does it let you compile it without a warning? Is that the proper behavior a compiler should have?
It is not the task of compiler, but the task of statical analyzer.
>>57819362
(int*)0 is a null pointer of type int, so reading its value should segfault
>>57819446
That's good, you understand basic C knowledge. Now actually read and understand the question this time.
If you word it like that then obviously you meant to segfault, so the compiler should just leave you be.
>>57818961
yes the compiler should let this through, it's valid code.
>op's image wasn't even NSFW
>still deleted
>>57818961return *static_cast<int*>(0);
ftfy