It's different viewpoints...
Posted May 27, 2011 14:26 UTC (Fri) by mpr22
In reply to: It's different viewpoints...
Parent article: What Every C Programmer Should Know About Undefined Behavior #3/3
Most optimizing compilers have a "do not optimize" mode. In gcc, "do not optimize" (-O0) is the default setting; you have to explicitly enable the footgun. -O0 still violates the programmer's expectations in C99 and C++98, though, since the "inline" keyword is ineffective, even on the tiniest of functions, when gcc's optimizer is disabled.
to post comments)