<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>Whoops, forgot to CC: the list.</div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><font size="2" face="Tahoma">----- Forwarded Message ----<br><b><span style="font-weight: bold;">From:</span></b> Samuel Crow <samuraileumas@yahoo.com><br><b><span style="font-weight: bold;">To:</span></b> Sheng Zhou <zhousheng00@gmail.com><br><b><span style="font-weight: bold;">Sent:</span></b> Tue, November 9, 2010 9:26:51 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [LLVMdev]  llvm-gcc not compatible with gcc on a small case?<br></font><br>
<meta http-equiv="x-dns-prefetch-control" content="off"><div style="font-family:times, serif;font-size:12pt;"><div>Hi Sheng Zhou,</div><div><br></div><div>It shouldn't compile.  You have the method declared inside the templated class thus indicating infinite recursion.  It should be outside the template shouldn't it?  What was the command line you used to compile it under both GCC and LLVM-GCC?</div><div><br></div><div>--Sam Crow</div><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;"><div style="font-family:times new roman, new york, times, serif;font-size:12pt;"><br><div style="font-family:times new roman, new york, times, serif;font-size:12pt;"><font size="2" face="Tahoma"><b><span style="font-weight:bold;">From:</span></b> Sheng Zhou <zhousheng00@gmail.com><br><b><span style="font-weight:bold;">To:</span></b>
 llvmdev@cs.uiuc.edu<br><b><span style="font-weight:bold;">Sent:</span></b> Tue, November 9, 2010 9:07:46 PM<br><b><span style="font-weight:bold;">Subject:</span></b> [LLVMdev]  llvm-gcc not compatible with gcc on a small case?<br></font><br>
 I found a case which gcc can compile while llvm-gcc can not. I'm using the gcc4.1 and  the most recent llvm-gcc.<br><br>Here is the case:<br><br>template <int N><br>class T { <br>public:<br>  int V;<br>};<br><br>

T<4> test(T<4> a[4][8]) {<br>  return a[3][3];<br>}<br><br><br><br>llvm-gcc dumped:<br><br>fail.cpp: In function \u2018T<4> test(T<4> (*)[8])\u2019:<br>fail.cpp:7: error: invalid use of incomplete type \u2018class T<4>\u2019<br>

fail.cpp:2: error: declaration of \u2018class T<4>\u2019<br><br>Guys, any idea for this issue?<br>
</div></div></blockquote><div style=""></div>


</div><br>







      <meta http-equiv="x-dns-prefetch-control" content="on"></div></div></blockquote><div style="position:fixed"></div></div><br>

      </body></html>