<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On May 22, 2014, at 11:40 AM, Richard Smith <<a href="mailto:richard@metafoo.co.uk">richard@metafoo.co.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Another problem with our current model is that we build a broken redeclaration chain (the local declaration is marked as being a redeclaration of the implicitly-declared builtin, which it isn't). This leads to other bugs; for instance:</div>
<div><br></div><div>void f() { int memcpy(void); } void g() { memcpy(0,0,0); }<br></div><div><br></div><div>... misses the "implicitly declaring library function" warning.</div></div></div></div></blockquote><div><br></div>Interesting point. Currently, we create a built-in declaration of “memcpy” and make local declaration as its redeclaration.</div><div>Should we just not create the implicit built-in declaration when user declaration is local? If we do this,</div><div>then the missing  warning you mentioned will come out (and my bug gets fixed). But, we will miss the warning </div><div>about "<font face="Menlo"><span style="font-size: 11px;">incompatible redeclaration of library function ‘memcpy’” on local “redeclaration”.</span></font></div><div><font face="Menlo"><span style="font-size: 11px;">Which, I think, is ok as it is no longer a redeclaration.</span></font></div><div><font face="Menlo"><span style="font-size: 11px;">Am I reading you correctly?</span></font></div><div><font face="Menlo"><span style="font-size: 11px;"><br></span></font></div><div><font face="Menlo"><span style="font-size: 11px;">- Fariborz</span></font></div><div><br></div><div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div>
</div></div></div>
</blockquote></div><br></body></html>