<br><br><div class="gmail_quote">On Tue, Jun 19, 2012 at 7:01 PM, Chris Hall <span dir="ltr"><<a href="mailto:chris.hall.list@highwayman.com" target="_blank">chris.hall.list@highwayman.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Chandler Carruth wrote (on Tue 19-Jun-2012 at 17:50 +0100)<br>
<div class="im">><br>
> On Tue, Jun 19, 2012 at 1:20 AM, Jay Foad <<a href="mailto:jay.foad@gmail.com">jay.foad@gmail.com</a>> wrote:<br>
</div>....<br>
<div class="im">>> #define N 8<br>
>> const int a[N] = { 3, 1, 4, 1, 5, 9, 2 };<br>
>> warning: some but not all array elements initialised<br>
</div>...<br>
<div class="im">> Maybe someone has clever ideas about how to syntactically differentiate<br>
> between these two use cases?<br>
<br>
</div> const int a[N] = { ..... } __attribute__((all_explicitly_initialised))<br>
<span class="HOEnZb"><font color="#888888"><br>
Chris<br>
</font></span><div class="HOEnZb"><div class="h5"><br><br></div></div></blockquote><div>Would a heuristic be acceptable ?<br><br>If the number of initializer is in [.9 * N, N) then it looks likely it is a bug. The .9 factor could probably benefit from some tuning, maybe as low as .5 would pass.<br>
<br>-- Matthieu. <br></div></div>