<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jul 9, 2014 at 9:30 AM, <a href="mailto:victor.zverovich@gmail.com">victor.zverovich@gmail.com</a> <span dir="ltr"><<a href="mailto:victor.zverovich@gmail.com" target="_blank">victor.zverovich@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hello,</div><div><br></div><div>The following code compiles without warnings or errors with clang++ -Wall -pedantic:</div>
<div><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">

<div><div>template <typename T></div></div><div><div>void f(const T&) {}</div></div><div><div><br></div></div><div><div>extern char test[];</div></div><div><div><br></div></div><div><div>int main() {</div></div>


<div><div>  f(test);</div></div><div><div>}</div></div><div><div><br></div></div><div><div>char test[] = "";</div></div></blockquote><div><br></div><div>However, quoting <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3376.pdf#page=196" target="_blank">C++11 8.3.5-8</a>:<br>


</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">If the type of a parameter includes a type of the form “pointer to array of unknown bound of T” or “reference to array of unknown bound of T,” the program is ill-formed.9</blockquote>


<div><br></div><div>So shouldn't clang gives at least a warning because the template parameter type in the example above is a reference to an array of unknown bound?</div></div></blockquote><div><br></div><div>Clang implements the proposed resolution to this C++ core language bug:</div>
<div><br></div><div><a href="http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#393">http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#393</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div>I'm using clang version 3.5-1ubuntu1.<br>

</div><div><br></div><div>Thanks,</div><div>Victor</div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>