Hi Richard,<div>Thanks your comments.</div><div><br></div><div>However, I have no idea whether I should do this patch.</div><div>I've tested by gcc, clang and searched C++ spec draft n3242, the result is that both GCC and Clang failed on that and I cannot find any wording on this issue.</div>
<div><br></div><div>Could you teach me more or could some else help?</div><div>Thanks!<br><br><div>  1 struct S {</div><div>  2   void foo() throw (S[10])  { throw 0; }  // Both gcc and clang failed on this function</div>
<div>  3   void bar() throw (S)  { throw 0; }</div><div>  4 };</div><div>  5</div><div>  6 int main() {</div><div>  7   S().foo();</div><div>  8   S().bar();</div><div>  9 }</div><div><br></div><br><br><br><div class="gmail_quote">
2012/11/21 Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div class="im"><br>
On Tue, Nov 20, 2012 at 1:54 AM, WenHan Gu (¨¦¨Z¿«) <<a href="mailto:wenhan.gu@gmail.com">wenhan.gu@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I've done the patch and testcase to fix PR14338.<br>
> <a href="http://llvm.org/bugs/show_bug.cgi?id=14388" target="_blank">http://llvm.org/bugs/show_bug.cgi?id=14388</a><br>
><br>
> Here's the patch, please review:<br>
> <a href="http://llvm.org/bugs/attachment.cgi?id=9574&action=diff" target="_blank">http://llvm.org/bugs/attachment.cgi?id=9574&action=diff</a><br>
><br>
><br>
> Is that okay to commit?<br>
<br>
</div>A matching update is needed in SemaTemplateInstantiateDecl. Perhaps<br>
you could put this logic into CheckSepcifiedExceptionType (and either<br>
return the modified type or pass it through by reference)? One of the<br>
checks in  CheckSpecifiedExceptionType also needs updating. With your<br>
patch, we still reject this:<br>
<br>
struct S {<br>
  void f() throw (S[10]);<br>
};<br>
<br>
... but we should accept it, because the type 'S' is supposed to be<br>
considered as complete in exception specifications inside its body.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Best regards,<div>Wen-Han Gu (Nowar)</div><br>
</div>