<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Oct 15, 2009, at 9:05 AM, John Thompson wrote:</div><blockquote type="cite">Sorry Chris, I meant to send this to the list.<br></blockquote><div><br></div>The relevant part of the dump is:</div><div><blockquote type="cite"><div class="gmail_quote"><p>  (DeclStmt 029B7238 <line:23:1, col:23><br>    029B70A8 "long x =<br>      (ImplicitCastExpr 029B71F0 <col:10, col:20> 'long' <Unknown><br>        (BinaryOperator 029B71A0 <col:10, col:20> 'int' '-'<br>          (AddrLabelExpr 029B7110 <col:10, col:12> 'void *' bar 029B7068)<br>          (AddrLabelExpr 029B7158 <col:18, col:20> 'void *' baz 029B7028)))"<br></p></div></blockquote></div><div>This case should have been fixed by r84039.  Can you verify that it still fails with ToT?</div><div><br></div><div>-Chris</div><div><br></div><div><br><blockquote type="cite"><br>
<div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">John Thompson</b> <span dir="ltr"><<a href="mailto:john.thompson.jtsoftware@gmail.com">john.thompson.jtsoftware@gmail.com</a>></span><br>
Date: Thu, Oct 15, 2009 at 8:59 AM<br>Subject: Re: [cfe-dev] CodeGen/statements.c: Don't understand test and its failure<br><br><br>
<div>
<div class="im">
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>This is the GNU address of a label extension.  Can you remove the 'static' (which will allow it to parse) and paste what clang-cc -ast-dump shows for that statement?<br></div></blockquote>
<div> </div>
<div> </div></div>
<div>Thanks.  Here it is:</div>
<div> </div></div>
<div>CodeGen/statements.c:5:6: warning: integer constant is too large for its type<br>case 111111111111111111111111111111111111111:<br>     ^<br>CodeGen/statements.c:5:6: warning: overflow converting case value to switch condition type (11011968431394943431 to 18446744072755114439)<br>
CodeGen/statements.c:11:15: warning: non-void function 'test2' should return a value<br>int test2() { return; }<br>              ^<br>CodeGen/statements.c:12:16: warning: void function 'test3' should not return a value<br>
void test3() { return 4; }<br>               ^      ~<br>CodeGen/statements.c:24:17: warning: incompatible pointer to integer conversion initializing 'void *', expected 'long'<br>static long y = &&baz;<br>
                ^~~~~<br>CodeGen/statements.c:28:10: warning: incompatible integer to pointer conversion passing 'long', expected 'void *'<br>    goto *y;<br>         ^~<br>CodeGen/statements.c:30:8: warning: incompatible integer to pointer conversion passing 'long', expected 'void *'<br>
  goto *x;<br>       ^~<br>CodeGen/statements.c:25:3: warning: expression result unused<br>  &&bing;<br>  ^~~~~~<br>CodeGen/statements.c:26:3: warning: expression result unused<br>  &&blong;<br>  ^~~~~~~<br>
CodeGen/statements.c:34:31: warning: incompatible integer to pointer conversion passing 'long long', expected 'void *'<br>int test5(long long b) { goto *b; }<br>                              ^~<br>typedef char *__builtin_va_list;<br>
void test1(int x) </div><p>int bar();<br>int test2() </p><p>void test3() </p><p>void test4() </p><p>int test5(long long b) </p><p>(CompoundStmt 029AF2D8 <CodeGen/statements.c:3:19, line:8:1><br>  (SwitchStmt 029AEC98 <line:4:1, line:7:1><br>    (DeclRefExpr 029B0570 <line:4:9> 'int' ParmVar='x' 029B0508)<br>    (CompoundStmt 029AF120 <col:12, line:7:1><br>
      (CaseStmt 029AEE48 <line:5:1, line:6:5><br>        (CallExpr 029AF0A8 <col:1, col:5> 'int'<br>          (ImplicitCastExpr 029AF060 <col:1> 'int (*)()' <FunctionToPointerDecay><br>
            (DeclRefExpr 029AEFD0 <col:1> 'int ()' FunctionDecl='bar' 029AEF40)))<br>        (ImplicitCastExpr 029AF1E8 <line:5:6> 'int' <Unknown><br>          (IntegerLiteral 029AEDF0 <col:6> 'unsigned long long' 11011968431394943431))<br>
        <<<NULL>>>))))<br>(CompoundStmt 029AF3F0 <CodeGen/statements.c:11:13, col:23><br>  (ReturnStmt 029AF3B0 <col:15>))<br>(CompoundStmt 029AF638 <CodeGen/statements.c:12:14, col:26><br>
  (ReturnStmt 029AF5F8 <col:16, col:23><br>    (IntegerLiteral 029AF5A0 <col:23> 'int' 4)))<br>(CompoundStmt 029AF740 <CodeGen/statements.c:15:14, line:31:1><br>  (LabelStmt 029B7068 <line:16:1, line:20:2> 'bar'<br>
    (LabelStmt 029B7028 <line:17:1, line:20:2> 'baz'<br>      (LabelStmt 029AF7C8 <line:18:1, line:20:2> 'blong'<br>        (LabelStmt 029AF788 <line:19:1, line:20:2> 'bing'<br>          (NullStmt 029AF230 <col:2>)))))<br>
  (DeclStmt 029B7238 <line:23:1, col:23><br>    029B70A8 "long x =<br>      (ImplicitCastExpr 029B71F0 <col:10, col:20> 'long' <Unknown><br>        (BinaryOperator 029B71A0 <col:10, col:20> 'int' '-'<br>
          (AddrLabelExpr 029B7110 <col:10, col:12> 'void *' bar 029B7068)<br>          (AddrLabelExpr 029B7158 <col:18, col:20> 'void *' baz 029B7028)))"<br>  (DeclStmt 029B7370 <line:24:1, col:22><br>
    029B7278 "static long y =<br>      (ImplicitCastExpr 029B7328 <col:17, col:19> 'long' <Unknown><br>        (AddrLabelExpr 029B72E0 <col:17, col:19> 'void *' baz 029B7028))"<br>
  (AddrLabelExpr 029B73B0 <line:25:3, col:5> 'void *' bing 029AF788)<br>  (AddrLabelExpr 029B73F8 <line:26:3, col:5> 'void *' blong 029AF7C8)<br>  (IfStmt 029B7558 <line:27:3, line:28:11><br>
    (DeclRefExpr 029B7440 <line:27:7> 'long' Var='y' 029B7278)<br>    (IndirectGotoStmt 029B7518 <line:28:5, col:11><br>      (ImplicitCastExpr 029B74D0 <col:11> 'void *' <Unknown><br>
        (DeclRefExpr 029B7488 <col:11> 'long' Var='y' 029B7278)))<br>    <<<NULL>>>)<br>  (IndirectGotoStmt 029B7630 <line:30:3, col:9><br>    (ImplicitCastExpr 029B75E8 <col:9> 'void *' <Unknown><br>
      (DeclRefExpr 029B75A0 <col:9> 'long' Var='x' 029B70A8))))<br>(CompoundStmt 029AE428 <CodeGen/statements.c:34:24, col:35><br>  (IndirectGotoStmt 029B7918 <col:26, col:32><br>    (ImplicitCastExpr 029B78D0 <col:32> 'void *' <Unknown><br>
      (DeclRefExpr 029B7888 <col:32> 'long long' ParmVar='b' 029B7708))))<br>10 diagnostics generated. 
</p><div class="im"><br><br><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com" target="_blank">John.Thompson.JTSoftware@gmail.com</a><br><br></div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div></div><br><br clear="all">
<div></div><br>-- <br>John Thompson<br><a href="mailto:John.Thompson.JTSoftware@gmail.com">John.Thompson.JTSoftware@gmail.com</a><br><br>
_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></body></html>