4 ms·
> I guess you could make the case that the C committee hate everyone and all stack objects are UB. Honestly, I think that this is the logical conclusion, or at
by saagarjha 8y ago
> I guess you could make the case that the C committee hate everyone and all stack objects are UB.
Honestly, I think that this is the logical conclusion, or at least, every compiler/machine implementation is subtly wrong; the standards glosses over what should happen when the stack is too large, for example, so technically any use of the stack is not guaranteed to be valid because you might just be out of space. The C standard is for a "head-in-the-clouds" abstract machine, so it doesn't concern itself with pedestrian issues like lack of memory.
- loeg 8y agoHeh, I guess that's possible. I hold out hope that it isn't the intent of the C committee, and maybe they'll consider firming up the stack memory model for C2x.