It's different viewpoints...
Posted May 25, 2011 16:57 UTC (Wed) by
jreiser (subscriber, #11027)
In reply to:
It's different viewpoints... by khim
Parent article:
What Every C Programmer Should Know About Undefined Behavior #3/3
This means every time undefined behavior is detected by the compiler it can be assumed this part is never actually executed with arguments which can trigger undefined behavior
I prefer that the compiler and I work as a team with the common goal of converting ideas into executable instructions with good properties. I want the compiler to tell me when and where it detects undefined behavior, so that I can adjust as appropriate. I want the compiler to tell me when and where its transformations change the class of a loop (body never executes, body executes a bounded non-zero number of times, body executes infinitely many times). I want the compiler to tell me when the written and the transformed exit condition for a loop have no variables in common. I consider it to be a Usability bug that gcc 4.5.1 does not tell me these interesting facts about 33498.c.
(
Log in to post comments)