2 ms·
> Now, in C it is undefined behaviour if either o in or out point into the stack where the variables i, in and out live Seems to me that that could only happen
by Sohcahtoa82 9y ago
> Now, in C it is undefined behaviour if either o in or out point into the stack where the variables i, in and out live
Seems to me that that could only happen if you had some other bug clobbering the values of in and out, or you're passing something to the function that you shouldn't be. In either case, it's an error on the side of the programmer.
> If you plan for this from the start with your language, you can drive the costs much lower.
It shouldn't be the job of the language or compiler to make up for the shortcomings of the programmer besides maybe code generation optimization.