Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 223

Comment by Peter - Reinstate Monica on How do I determine the evaluation order of printf?

$
0
0
@Mark Yes, the compiler should be deterministic here (and, additionally, not depend on unrelated side conditions like the time of day etc.). But the compiler is free to do things differently from case to case depending on relevant side conditions: In particular, as Lundin said in this good answer, number and type of arguments. It may, for example, replace printf with something entirely different, like an intrinsic function. It may then pass the arguments in registers. It may also produce ad-hoc inline code for known, common cases.

Viewing all articles
Browse latest Browse all 223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>