Optimizations and undefined behavior
Posted Jul 21, 2009 20:11 UTC (Tue) by
martinfick (subscriber, #4455)
In reply to:
Optimizations and undefined behavior by BrucePerens
Parent article:
Fun with NULL pointers, part 1
"Implementation dependent" means that the folks who change the compiler, the C library, the kernel, and any stack-smashing detection/prevention code that you are using have the right to change the behavior at any time without documenting the particular side-effect that your code is depending upon.
No, it does not always mean this. In this particular case it may, but it is perfectly reasonable for a specific C compiler to specify its behavior when the standard says that it is undefined, that is the point of "undefined" and "Implementation dependent".
"Implementation dependent" != `cat /dev/urandom`
(
Log in to post comments)