<div dir="ltr">On 14 November 2013 14:50, Sean McBride <span dir="ltr"><<a href="mailto:sean@rogue-research.com" target="_blank">sean@rogue-research.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<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">Hi all,<br>
<br>
I'm not a language lawyer, but consider:<br>
<br>
----------------------<br>
#include <stdio.h><br>
<br>
static void PrintIt(double value)<br>
{<br>
printf("value is %f \n", value);<br>
}<br>
<br>
template <class T><br>
void Function(T *value)<br>
{<br>
PrintIt(*value);<br>
}<br>
<br>
int main ()<br>
{<br>
int x = 1;<br>
Function(&x);<br>
<br>
short y = 2;<br>
Function(&y);<br>
<br>
return x + y;<br>
}<br>
----------------------<br>
<br>
clang -std=c++03 -pedantic -Weverything test.cxx<br>
<br>
gives no warning/error. C++03 14.6.4.2 seems to say that, since PrintIt() is static, it should not be found. xlc generates an error:<br>
<br>
*The name lookup for "PrintIt" did not find a declaration.<br>
*Static declarations are not considered for a function call if the function is not qualified.<br>
<br>
Shouldn't clang be producing a diagnostic here?<br>
<br>
(If I remove the static, clang's -Wmissing-prototypes complains; and if I add the static, xlc complains.)<br></blockquote><div><br></div><div>This is <a href="http://llvm.org/PR7396">llvm.org/PR7396</a> which was resolved wontfix.</div>
<div></div></div><br></div><div class="gmail_extra">Nick</div><div class="gmail_extra"><br></div></div>