<div class="gmail_quote">On Fri, Jul 29, 2011 at 3:56 AM, Peter Geoghegan <span dir="ltr"><<a href="mailto:peter@2ndquadrant.com">peter@2ndquadrant.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
So, my second blog post on this subject has a benchmark that sees<br>
clang do quite well:<br>
<br>
<a href="http://pgeoghegan.blogspot.com/2011/07/could-clang-displace-gcc-generally-part.html" target="_blank">http://pgeoghegan.blogspot.com/2011/07/could-clang-displace-gcc-generally-part.html</a><br>
<br>
It was picked up by Reddit, and has received a few thousand unique<br>
visitors since yesterday.<br>
<br>
Anyway, I'm disappointing that no headway has been made on this issue<br>
after a week. Chandler, could you please let me know if it is still<br>
your intent to fix this problem, and if so whether or not you favour<br>
suppressing it in C99 too?</blockquote><div><br></div><div>Sorry about the delays here. My time kept geting co-opted by burning fires on other fronts.</div><div><br></div><div>Chris ended up doing a quick patch for this a couple of days ago, and I've now gone through and applied most of the logic discussed here as of r136965.</div>
<div><br></div><div>Specifically, the array-bounds warning is now suppressed iff:</div><div>1) The array size is one, and</div><div>2) The array is declared as the last field in a struct, and</div><div>3) The array's size is written as a literal '1' rather than being expanded from a macro or substituted from a template argument</div>
<div><br></div><div>I've not added a warning in C99 or C++ modes which suggests flexible arrays as its not clear to me how productive such a warning would be. Given the restrictions above, it is very unlikely to represent a bug (i hope!) and so warning seems more noise than signal.</div>
<div><br></div><div>Let me know if you hit issues with this logic.</div></div>