<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Oct 15, 2008, at 6:31 PM, Argiris Kirtzidis wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>I fixed the asserts here: <a href="http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20081013/008199.html">http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20081013/008199.html</a><br><br></div></blockquote><div><br></div>Thanks for working on this! (It's nice when all the tests succeed:-)</div><div><br><blockquote type="cite"><div>BTW, I'm seeing these errors on both of the files that you gave me:<br><br>carbon-i.cpp:1194:33: error: redefinition of 'size_t'<br>typedef __typeof__(sizeof(int)) size_t;<br> ^<br>carbon-i.cpp:169:25: error: previous definition is here<br>typedef __darwin_size_t size_t;<br> ^<br>carbon-i.cpp:1195:26: error: redefinition of 'va_list'<br>typedef __darwin_va_list va_list;<br> ^<br>carbon-i.cpp:197:27: error: previous definition is here<br>typedef __builtin_va_list va_list;<br> ^<br><br>Is this a problem of clang ?</div></blockquote><div><br></div>This "problem" only shows up when clang parses the preprocessed file. It works fine when parsing the original source.</div><div><br></div><div>Here is a comment I added to Sema::MergeTypeDefDecl awhile ago:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); "><span style="color: #000000"> </span>// Redeclaration of a type is a constraint violation (6.7.2.3p1).</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); "><span style="color: #000000"> </span>// Apparently GCC, Intel, and Sun all silently ignore the redeclaration if</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); "><span style="color: #000000"> </span>// *either* declaration is in a system header. The code below implements</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); "><span style="color: #000000"> </span>// this adhoc compatibility rule. FIXME: The following code will not</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(0, 116, 0); "><span style="color: #000000"> </span>// work properly when compiling ".i" files (containing preprocessed output).</div><div><font class="Apple-style-span" color="#007400" face="Monaco" size="2"><span class="Apple-style-span" style="font-size: 10px;"><br></span></font></div><div>Regards,</div><div><br></div><div>snaroff</div><div><br></div><blockquote type="cite"><div><br><br>-Argiris<br><br><br>steve naroff wrote:<br><blockquote type="cite">I've been seeing the errors below for a couple days now.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Are other folks seeing these? (I did a clean build of both llvm and clang to make sure I had "fresh" binaries...).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">snaroff<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">******************** TEST '/Volumes/Data/llvm/tools/clang/test/ SemaObjCXX//cocoa.mm' FAILED! ********************<br></blockquote><blockquote type="cite">Command:<br></blockquote><blockquote type="cite"> clang /Volumes/Data/llvm/tools/clang/test/SemaObjCXX//cocoa.mm - print-stats<br></blockquote><blockquote type="cite">Incorrect Output:<br></blockquote><blockquote type="cite">Assertion failed: (isa<X>(Val) && "cast<Ty>() argument of incompatible type!"), function cast, file /Volumes/Data/llvm/include/llvm/Support/ Casting.h, line 199.<br></blockquote><blockquote type="cite">0 clang 0x00339997 _ZN4llvm3sys7Program17FindProgramByNameERKSs + 611<br></blockquote><blockquote type="cite">1 clang 0x00339c61 _ZN4llvm3sys28PrintStackTraceOnErrorSignalEv + 593<br></blockquote><blockquote type="cite">2 libSystem.B.dylib 0x94a8409b _sigtramp + 43<br></blockquote><blockquote type="cite">3 ??? 0xffffffff 0x0 + 4294967295<br></blockquote><blockquote type="cite">4 libSystem.B.dylib 0x94afcec2 raise + 26<br></blockquote><blockquote type="cite">5 libSystem.B.dylib 0x94b0c47f abort + 73<br></blockquote><blockquote type="cite">6 libSystem.B.dylib 0x94afe063 __assert_rtn + 101<br></blockquote><blockquote type="cite">7 clang 0x001511af _ZN4llvm4castIN5clang8TypeDeclEPNS1_4DeclEEENS_10cast_rettyIT_T0_E8ret_typeERKS7_ + 91<br></blockquote><blockquote type="cite">8 clang 0x0014f847 _ZN5clang4Sema24ActOnCXXMemberDeclaratorEPNS_5ScopeENS_15AccessSpecifierERNS_10DeclaratorEPvS6_S6_ + 355<br></blockquote><blockquote type="cite">9 clang 0x001f67bf _ZN5clang6Parser30ParseCXXClassMemberDeclarationENS_15AccessSpecifierE + 1139<br></blockquote><blockquote type="cite">10 clang 0x001f6d76 _ZN5clang6Parser27ParseCXXMemberSpecificationENS_14SourceLocationEjPv + 478<br></blockquote><blockquote type="cite">11 clang 0x001f72eb _ZN5clang6Parser19ParseClassSpecifierERNS_8DeclSpecE + 947<br></blockquote><blockquote type="cite">12 clang 0x001f2b3b _ZN5clang6Parser26ParseDeclarationSpecifiersERNS_8DeclSpecE + 2655<br></blockquote><blockquote type="cite">13 clang 0x001f3a29 _ZN5clang6Parser22ParseSimpleDeclarationEj + 39<br></blockquote><blockquote type="cite">14 clang 0x001f3b1f _ZN5clang6Parser16ParseDeclarationEj + 43<br></blockquote><blockquote type="cite">15 clang 0x0020b8e2 _ZN5clang6Parser24ParseExternalDeclarationEv + 562<br></blockquote><blockquote type="cite">16 clang 0x0020b947 _ZN5clang6Parser17ParseTopLevelDeclERPv + 85<br></blockquote><blockquote type="cite">17 clang 0x00132ba6 _ZN5clang8ParseASTERNS_12PreprocessorEPNS_11ASTConsumerEb + 404<br></blockquote><blockquote type="cite">18 clang 0x000338da _Z22InitializeIncludePathsPKcRN5clang12HeaderSearchERNS1_11FileManagerERKNS1_11LangOptionsE + 3442<br></blockquote><blockquote type="cite">19 clang 0x00034b21 main + 1643<br></blockquote><blockquote type="cite">20 clang 0x000022a2 start + 54<br></blockquote><blockquote type="cite">21 ??? 0x00000003 0x0 + 3<br></blockquote><blockquote type="cite">Output//Volumes/Data/llvm/tools/clang/test/SemaObjCXX// cocoa.mm.out.script: line 1: 70585 Abort trap clang / Volumes/Data/llvm/tools/clang/test/SemaObjCXX//cocoa.mm -print-stats<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">******************** TEST '/Volumes/Data/llvm/tools/clang/test/ SemaCXX//carbon.cpp' FAILED! ********************<br></blockquote><blockquote type="cite">Command:<br></blockquote><blockquote type="cite"> clang /Volumes/Data/llvm/tools/clang/test/SemaCXX//carbon.cpp - fsyntax-only -print-stats<br></blockquote><blockquote type="cite">Incorrect Output:<br></blockquote><blockquote type="cite">Assertion failed: (SC == VarDecl::Static && "Invalid storage class for member!"), function ActOnDeclarator, file SemaDecl.cpp, line 754.<br></blockquote><blockquote type="cite">0 clang 0x00339997 _ZN4llvm3sys7Program17FindProgramByNameERKSs + 611<br></blockquote><blockquote type="cite">1 clang 0x00339c61 _ZN4llvm3sys28PrintStackTraceOnErrorSignalEv + 593<br></blockquote><blockquote type="cite">2 libSystem.B.dylib 0x94a8409b _sigtramp + 43<br></blockquote><blockquote type="cite">3 ??? 0xffffffff 0x0 + 4294967295<br></blockquote><blockquote type="cite">4 libSystem.B.dylib 0x94afcec2 raise + 26<br></blockquote><blockquote type="cite">5 libSystem.B.dylib 0x94b0c47f abort + 73<br></blockquote><blockquote type="cite">6 libSystem.B.dylib 0x94afe063 __assert_rtn + 101<br></blockquote><blockquote type="cite">7 clang 0x00142977 _ZN5clang4Sema15ActOnDeclaratorEPNS_5ScopeERNS_10DeclaratorEPv + 2951<br></blockquote><blockquote type="cite">8 clang 0x0014f923 _ZN5clang4Sema24ActOnCXXMemberDeclaratorEPNS_5ScopeENS_15AccessSpecifierERNS_10DeclaratorEPvS6_S6_ + 575<br></blockquote><blockquote type="cite">9 clang 0x001f67bf _ZN5clang6Parser30ParseCXXClassMemberDeclarationENS_15AccessSpecifierE + 1139<br></blockquote><blockquote type="cite">10 clang 0x001f6d76 _ZN5clang6Parser27ParseCXXMemberSpecificationENS_14SourceLocationEjPv + 478<br></blockquote><blockquote type="cite">11 clang 0x001f72eb _ZN5clang6Parser19ParseClassSpecifierERNS_8DeclSpecE + 947<br></blockquote><blockquote type="cite">12 clang 0x001f2b3b _ZN5clang6Parser26ParseDeclarationSpecifiersERNS_8DeclSpecE + 2655<br></blockquote><blockquote type="cite">13 clang 0x001f3a29 _ZN5clang6Parser22ParseSimpleDeclarationEj + 39<br></blockquote><blockquote type="cite">14 clang 0x001f3b1f _ZN5clang6Parser16ParseDeclarationEj + 43<br></blockquote><blockquote type="cite">15 clang 0x0020b8e2 _ZN5clang6Parser24ParseExternalDeclarationEv + 562<br></blockquote><blockquote type="cite">16 clang 0x0020b947 _ZN5clang6Parser17ParseTopLevelDeclERPv + 85<br></blockquote><blockquote type="cite">17 clang 0x00132ba6 _ZN5clang8ParseASTERNS_12PreprocessorEPNS_11ASTConsumerEb + 404<br></blockquote><blockquote type="cite">18 clang 0x000338da _Z22InitializeIncludePathsPKcRN5clang12HeaderSearchERNS1_11FileManagerERKNS1_11LangOptionsE + 3442<br></blockquote><blockquote type="cite">19 clang 0x00034b21 main + 1643<br></blockquote><blockquote type="cite">20 clang 0x000022a2 start + 54<br></blockquote><blockquote type="cite">Output//Volumes/Data/llvm/tools/clang/test/SemaCXX// carbon.cpp.out.script: line 1: 69379 Abort trap clang / Volumes/Data/llvm/tools/clang/test/SemaCXX//carbon.cpp -fsyntax-only - print-stats<br></blockquote><blockquote type="cite">******************** TEST '/Volumes/Data/llvm/tools/clang/test/ SemaCXX//carbon.cpp' FAILED! ********************<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">cfe-dev mailing list<br></blockquote><blockquote type="cite"><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br></blockquote><blockquote type="cite"><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> <br></blockquote></div></blockquote></div><br></body></html>