<div class="gmail_extra"><div class="gmail_quote">On Tue, Sep 11, 2012 at 3:14 AM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank" class="cremed">chandlerc@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote"><div class="im">On Tue, Sep 11, 2012 at 2:58 AM, David Chisnall <span dir="ltr"><<a href="mailto:csdavec@swan.ac.uk" target="_blank" class="cremed">csdavec@swan.ac.uk</a>></span> wrote:<br>

</div><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: theraven<br>
Date: Tue Sep 11 04:58:54 2012<br>
New Revision: 163605<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=163605&view=rev" target="_blank" class="cremed">http://llvm.org/viewvc/llvm-project?rev=163605&view=rev</a><br>
Log:<br>
Select the correct, or, failing that, compatible, dialect when invoked as cc,<br>
c89, c99, and so on.  No change to the default dialect when invoked as clang /<br>
clang++.<br></blockquote></div><div><br><div class="im">This seems like a significant new user-visible feature. I would like to have seen at least a brief discussion on cfe-dev about adding support to this to make sure there aren't problems. The POSIX spec'ed bits seem pretty reasonable, however:</div>
</div>
<div><br></div><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">+    { "clang", false, false, 0 },<br>


+    { "clang++", true, false, 0 },<br>
+    { "clang-c++", true, false, 0 },<br>
+    { "clang-cc", false, false, "-std=c89" },<br>
+    { "clang-cpp", false, true, 0 },<br>
+    { "clang-g++", true, false, "-std=gnu++89" },<br>
+    { "clang-gcc", false, false, "-std=gnu89" },<br></blockquote><div><br></div></div><div class="im"><div><div>This doesn't make much sense to me... We've never had a symlink name that changes from strict standard mode to the GNU dialect, and there has been no indication of that changing. You don't mention it in your commit log or in the comments. What's the rationale here?</div>

<div><br></div><div>Again, maybe a better discussion to have on a broader list rather than just here on the commit list...</div><div><br></div></div></div><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

+    { "cc", false, false, "-std=c89" },<br>
+    { "c89", false, false, "-std=c89" },<br>
+    { "c99", false, false, "-std=c99" },<br>
+    { "c11", false, false, "-std=c11" },<br>
+    { "cpp", false, true, 0 },<br>
+    { "++", true, false, 0 },<br>
   };<br>
   std::string ProgName(llvm::sys::path::stem(ArgVector[0]));<br>
   StringRef ProgNameRef(ProgName);<br>
@@ -304,10 +315,14 @@<br>
     for (i = 0; i < sizeof(suffixes) / sizeof(suffixes[0]); ++i) {<br>
       if (ProgNameRef.endswith(suffixes[i].Suffix)) {<br>
         FoundMatch = true;<br>
-        if (suffixes[i].IsCXX)<br>
+        if (suffixes[i].IsCXX) {<br>
           TheDriver.CCCIsCXX = true;<br>
+          fprintf(stderr, "ccc is c++\n");<br></blockquote><div><br></div></div><div class="im"><div><div>Er, huh? This should be removed. Also, it broke the build, so please fix or back out promptly.</div></div>
</div></div></div></blockquote><div><br></div><div>FYI, I went ahead and temporarily reverted in r163609 so the build bots and developers could make progress. We can keep going with any review here though... </div></div></div>