On Jan 23, 2013, at 11:57 AM, Daniel Dunbar <[email protected]> wrote: > On Wed, Jan 23, 2013 at 11:44 AM, Chandler Carruth <[email protected]> > wrote: > > On Wed, Jan 23, 2013 at 11:07 AM, John McCall <[email protected]> wrote: > A significant part of the problem, I believe, is that there's a lot of > mostly-externally-maintained C code which, at Apple, happens to need to be > compiled as C++. > > FWIW, this makes perfect sense, and also makes perfect sense out of a flag to > essentially get C's return semantics in a C++ compilation in order to support > such code. > > This is still the wrong direction of the flag. I just haven't seen good > justification for changing the compiler in this way to merit the possibility > of breaking working code.
Every change can break working code. Warning changes can break working code if it's compiled with -Werror. "Show me a whole-percentage speedup or take the optimization out" is not really a reasonable response to every last proposal. In LLVM and clang, we have a lot of places where we use unreachable annotations; I think Chandler's argument is quite correct that these situations come up all the time for many users and that it's ultimately not reasonable to expect non-compiler people to use those annotations pervasively. Our specific internal problem that makes this seem like a non-starter is that we have a pool of known code that's very awkward to fix. We do control the build environment for that code, though. For purposes of investigation, we can reasonably assume that any project that turns off -Wreturn-value should probably also disable the optimization. Any stragglers can be tracked down and fixed just like we would with any other compiler change. John.
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
