Do you mean it as a philosophical POV or that gcc will optimize "if (p)" away based on this assumption?
-
-
Not sure what you are asking for. Surely if you non-trivially use whole allocated block this cannot be optimized away.
-
The question is what is "actually used" or "non-trivially use".
-
F.e., https://godbolt.org/g/4fU99Z exhausts the stack when compiled without optimizations.
-
https://godbolt.org/g/sb0Lah aborts (due to the lack of memory) without optimizations and with -m32.
-
You can of course optimize these examples by hand. But the same is true for other cases and other optimizations.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.