Post
Piggo :verified_horse: compilers do stupid optimizations based on supposed UB all the time.
And this particular code seems to compile correctly* today: godbolt.org/z/E5YccWc31
but I'm not asking if it compiles correctly* today.
I'm asking if the C standard requires the compiler to compile it correctly* or if it allows a stupid optimization.
*by "correctly" I mean preserving the null check before the dereference
0
0
0
Broken Pig for the record i tried it and it does not crash
0
0
0