<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">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><br></div><div>I'm using clang version 3.5-1ubuntu1.<br>

</div><div><br></div><div>Thanks,</div><div>Victor</div></div>