<div>Thanks, Doug.  I've commited the one you indicated in 85236.</div>
<div> </div>
<div>For typedef-redecl.cpp, it does appear that VC++ doesn't flag line 10 as an error:</div>
<div> </div>
<div>C:\Tools\llvm\tools\clang\test\SemaCXX>cl -c typedef-redecl.cpp<br>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86<br>Copyright (C) Microsoft Corporation.  All rights reserved.</div>

<div>typedef-redecl.cpp<br>typedef-redecl.cpp(6) : error C2371: 'REALLY_INT' : redefinition; different basic types<br>        typedef-redecl.cpp(3) : see declaration of 'REALLY_INT'<br>typedef-redecl.cpp(14) : error C2371: 'Y' : redefinition; different basic types<br>
        typedef-redecl.cpp(13) : see declaration of 'Y'<br>typedef-redecl.cpp(17) : error C2371: 'Y2' : redefinition; different basic types<br>        typedef-redecl.cpp(16) : see declaration of 'Y2'<br>
typedef-redecl.cpp(20) : error C2365: 'f' : redefinition; previous definition was 'function'<br>        typedef-redecl.cpp(19) : see declaration of 'f'<br>typedef-redecl.cpp(23) : error C2365: 'f2' : redefinition; previous definition was 'typedef'<br>
        typedef-redecl.cpp(22) : see declaration of 'f2'<br><br>-John<br> </div>
<div class="gmail_quote">On Mon, Oct 26, 2009 at 5:31 PM, Douglas Gregor <span dir="ltr"><<a href="mailto:dgregor@apple.com">dgregor@apple.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im"><br>On Oct 21, 2009, at 12:05 PM, John Thompson wrote:<br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">By adding -fms-extensions=0 to some of the tests previously failing on Windows, it makes these 6 tests pass on Windows.<br>
<br>The question is, are these legitimate differences between the default Clang behavior and MSVC?<br></blockquote><br></div>Yes, except possibly for typedef-redecl.cpp; see my comment below. 
<div class="im"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">They seem sort of reasonable, but I'm not knowledgeable enough to say for sure.<br></blockquote><br></div>
They match up with a few specific places where we try to match MSVC's behavior; comments below. 
<div class="im"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">The enclosed patch contains these changes.<br></blockquote><br></div>Please go ahead and apply the patch for everything except typedef-redecl.cpp; for that file, we'll need some more information about how MSVC behaves to do the right thing. 
<div class="im"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Here is the previous test output:<br><br>1>********************<br>1>FAIL: Clang::SemaTemplate/nested-name-spec-template.cpp (1664 of 1692)<br>
1>******************** TEST 'Clang::SemaTemplate/nested-name-spec-template.cpp' FAILED ********************<br>1>Script:<br>1>--<br>1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -verify C:\Tools\llvm\tools\clang\test\SemaTemplate\nested-name-spec-template.cpp<br>
1>--<br>1>Exit Code: 1<br>1>Command Output (stdout):<br>1>--<br>1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only" "-verify" "C:\Tools\llvm\tools\clang\test\SemaTemplate\nested-name-spec-template.cpp"<br>
1>Command 0 Result: 1<br>1>Command 0 Output:<br>1>Command 0 Stderr:<br>1>Errors expected but not seen:<br>1>  Line 34: C++ requires a type specifier for all declarations<br>1>Warnings seen but not expected:<br>
1>  Line 34: type specifier missing, defaults to 'int'<br></blockquote><br></div>Makes sense. Visual C++ appears to support C's "implicit int" even in C++ mode, so we mimic that in Clang. 
<div>
<div></div>
<div class="h5"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">1>Command Output (stderr):<br>1>--<br>1>--<br>1>********************<br>1>FAIL: Clang::Preprocessor/line-directive.c (903 of 1692)<br>
1>******************** TEST 'Clang::Preprocessor/line-directive.c' FAILED ********************<br>1>Script:<br>1>--<br>1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -verify -pedantic C:\Tools\llvm\tools\clang\test\Preprocessor\line-directive.c<br>
1>C:/Tools/llvm/bin/Debug/clang-cc.exe -E C:\Tools\llvm\tools\clang\test\Preprocessor\line-directive.c 2>&1 | grep 'blonk.c:92:2: error: #error ABC'<br>1>C:/Tools/llvm/bin/Debug/clang-cc.exe -E C:\Tools\llvm\tools\clang\test\Preprocessor\line-directive.c 2>&1 | grep 'blonk.c:93:2: error: #error DEF'<br>
1>--<br>1>Exit Code: 1<br>1>Command Output (stdout):<br>1>--<br>1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only" "-verify" "-pedantic" "C:\Tools\llvm\tools\clang\test\Preprocessor\line-directive.c"<br>
1>Command 0 Result: 1<br>1>Command 0 Output:<br>1>Command 0 Stderr:<br>1>Errors expected but not seen:<br>1>  Line 44: redefinition of typedef 'x' is invalid in C<br>1>  Line 65: redefinition of typedef 'w' is invalid in C<br>
1>Notes expected but not seen:<br>1>  Line 43: previous definition is here<br>1>  Line 64: previous definition is here<br></blockquote><br></div></div>Makes sense. Visual C++ appears to support typedef redefinition even in C, so we mimic that in Clang. 
<div>
<div></div>
<div class="h5"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">1>Command Output (stderr):<br>1>--<br>1>--<br>1>********************<br>1>FAIL: Clang::Parser/cxx-template-decl.cpp (793 of 1692)<br>
1>******************** TEST 'Clang::Parser/cxx-template-decl.cpp' FAILED ********************<br>1>Script:<br>1>--<br>1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -verify C:\Tools\llvm\tools\clang\test\Parser\cxx-template-decl.cpp<br>
1>--<br>1>Exit Code: 1<br>1>Command Output (stdout):<br>1>--<br>1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only" "-verify" "C:\Tools\llvm\tools\clang\test\Parser\cxx-template-decl.cpp"<br>
1>Command 0 Result: 1<br>1>Command 0 Output:<br>1>Command 0 Stderr:<br>1>Errors expected but not seen:<br>1>  Line 5: C++ requires a type specifier for all declarations<br>1>  Line 57: declaration of 'T' shadows template parameter<br>
1>  Line 61: declaration of 'T' shadows template parameter<br>1>  Line 64: declaration of 'T' shadows template parameter<br>1>  Line 68: declaration of 'Size' shadows template parameter<br>
1>  Line 73: shadows<br>1>  Line 78: shadows<br>1>Warnings seen but not expected:<br>1>  Line 5: type specifier missing, defaults to 'int'<br>1>Notes expected but not seen:<br>1>  Line 56: template parameter is declared here<br>
1>  Line 60: template parameter is declared here<br>1>  Line 63: template parameter is declared here<br>1>  Line 67: template parameter is declared here<br>1>  Line 71: here<br>1>  Line 76: here<br></blockquote>
<br></div></div>Okay. Visual C++ does not diagnose shadowing of template parameters, so we allow such shadowing in Microsoft-extensions mode. 
<div class="im"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">1>Command Output (stderr):<br>1>--<br>1>--<br>1>********************<br>1>FAIL: Clang::SemaCXX/implicit-int.cpp (1290 of 1692)<br>
1>******************** TEST 'Clang::SemaCXX/implicit-int.cpp' FAILED ********************<br>1>Script:<br>1>--<br>1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -verify C:\Tools\llvm\tools\clang\test\SemaCXX\implicit-int.cpp<br>
1>--<br>1>Exit Code: 1<br>1>Command Output (stdout):<br>1>--<br>1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only" "-verify" "C:\Tools\llvm\tools\clang\test\SemaCXX\implicit-int.cpp"<br>
1>Command 0 Result: 1<br>1>Command 0 Output:<br>1>Command 0 Stderr:<br>1>Errors expected but not seen:<br>1>  Line 3: C++ requires a type specifier for all declarations<br>1>  Line 5: C++ requires a type specifier for all declarations<br>
1>Warnings seen but not expected:<br>1>  Line 3: type specifier missing, defaults to 'int'<br>1>  Line 5: type specifier missing, defaults to 'int'<br></blockquote><br></div>Again with the implicit-int-in-C++ extension. 
<div class="im"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">1>Command Output (stderr):<br>1>--<br>1>--<br>1>********************<br>1>FAIL: Clang::SemaCXX/typedef-redecl.cpp (1352 of 1692)<br>
1>******************** TEST 'Clang::SemaCXX/typedef-redecl.cpp' FAILED ********************<br>1>Script:<br>1>--<br>1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -verify C:\Tools\llvm\tools\clang\test\SemaCXX\typedef-redecl.cpp<br>
1>--<br>1>Exit Code: 1<br>1>Command Output (stdout):<br>1>--<br>1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only" "-verify" "C:\Tools\llvm\tools\clang\test\SemaCXX\typedef-redecl.cpp"<br>
1>Command 0 Result: 1<br>1>Command 0 Output:<br>1>Command 0 Stderr:<br>1>Errors expected but not seen:<br>1>  Line 10: redefinition of 'result_type'<br>1>Notes expected but not seen:<br>1>  Line 9: previous definition is here<br>
</blockquote><br></div>Hrm. This might actually be a Clang bug... does Visual C++ diagnose this as an error? 
<div>
<div></div>
<div class="h5"><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">1>Command Output (stderr):<br>1>--<br>1>--<br>1>********************<br>1>FAIL: Clang::SemaCXX/nested-name-spec.cpp (1309 of 1692)<br>
1>******************** TEST 'Clang::SemaCXX/nested-name-spec.cpp' FAILED ********************<br>1>Script:<br>1>--<br>1>C:/Tools/llvm/bin/Debug/clang-cc.exe -fsyntax-only -std=c++98 -verify C:\Tools\llvm\tools\clang\test\SemaCXX\nested-name-spec.cpp<br>
1>--<br>1>Exit Code: 1<br>1>Command Output (stdout):<br>1>--<br>1>Command 0: "C:/Tools/llvm/bin/Debug/clang-cc.exe" "-fsyntax-only" "-std=c++98" "-verify" "C:\Tools\llvm\tools\clang\test\SemaCXX\nested-name-spec.cpp"<br>
1>Command 0 Result: 1<br>1>Command 0 Output:<br>1>Command 0 Stderr:<br>1>Errors expected but not seen:<br>1>  Line 171: C++ requires a type specifier for all declarations<br>1>  Line 192: C++ requires a type specifier for all declarations<br>
1>Errors seen but not expected:<br>1>  Line 195: cannot initialize 'a3' with an lvalue of type 'int'<br>1>Warnings seen but not expected:<br>1>  Line 171: type specifier missing, defaults to 'int'<br>
1>  Line 192: type specifier missing, defaults to 'int'<br></blockquote><br></div></div>This is the implicit-int-in-C++ extension.<br><br>Thanks for working on this!<br><br>       - Doug<br></blockquote></div><br>
<br clear="all"><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br>