<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">On Jul 30, 2013, at 12:24 PM, Eli Friedman <<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>> wrote:<br><div><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">John probably remembers the details here more clearly, but it looks<br>correct to me.<br></div></blockquote><div><br></div>No, the protocol between the driver and the frontend needs to change here.</div><div><br></div><div>-fobjc-exceptions and -fcxx-exceptions will be the default if those languages</div><div>are enabled, so the frontend should stop looking for -fcxx-exceptions and</div><div>-fobjc-exceptions and should start looking for -fno-cxx-exceptions and</div><div>-fno-objc-exceptions.</div><div><br></div><div>-fexceptions is complicated because the driver logic is dependent on the</div><div>ObjC runtime.  I would say that ObjC should enable -fexceptions by default</div><div>if the runtime hasUnwindExceptions(); it doesn’t need to repeat the</div><div>Darwin/x86-64 from the driver.</div><div><br></div><div>So, basically, the frontend logic should be something like this:</div><div> CXXExceptions = (CPlusPlus && !hasArg(“-fno-cxx-exceptions”));</div><div> ObjCExceptions = (ObjC1 && !hasArg(“-fno-objc-exceptions”));</div><div> Exceptions = (CXXExceptions || (ObjCExceptions && ObjCRuntime.hasUnwindExceptions()) || hasArg(“-fexceptions”)) && !hasArg(“-fno-exceptions”);</div><div><br></div><div>And then the driver basically makes the same decision that it does today,</div><div>and if that differs from what it knows the frontend will decide, it should</div><div>pass the appropriate option.</div><div><br></div><div>John.</div></body></html>