Thanks Jean for the information :-)<div>~Umesh</div><div><br><div class="gmail_quote">On Wed, Sep 12, 2012 at 5:45 PM, Jean-Daniel Dupas <span dir="ltr"><<a href="mailto:devlists@shadowlab.org" target="_blank">devlists@shadowlab.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I don't have code that use it right here but for example you may want to write a function that read a 32 bytes fixed size header.<div>
<br></div><div>Whatever_t readHeader(char bytes[static 32]);<br><div><br></div><div><br></div><div><br><div><div>Le 12 sept. 2012 à 12:11, Umesh Kalappa <<a href="mailto:umesh.kalappa0@gmail.com" target="_blank">umesh.kalappa0@gmail.com</a>> a écrit :</div>
<br><blockquote type="cite"><div><div class="h5"><span style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Hi Richard,</span><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">

<br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">Thank you for the reply and I'm looking at real/piratical cases or need that  requires the prototype like   int func(int array[static 100]).</div>

<div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif"><br></div><div style="color:rgb(34,34,34);font-size:13px;font-family:arial,sans-serif">
~Umesh </div><br><div class="gmail_quote">On Wed, Sep 12, 2012 at 1:53 PM, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div>On Wed, Sep 12, 2012 at 12:16 AM, Umesh Kalappa <span dir="ltr"><<a href="mailto:umesh.kalappa0@gmail.com" target="_blank">umesh.kalappa0@gmail.com</a>></span> wrote:<br></div></div>
<div class="gmail_quote"><div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Hi All ,</div><div>Was going through the C99 standard @ <a href="http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf" target="_blank">http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf</a> which states that the Function declarators as </div>



<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>direct-declarator ( parameter-type-list )</div><div>parameter-list: parameter-declaration</div><div><div>                      parameter-list , parameter-declaration</div>



</div><div>parameter-declaration: declaration-specifiers declarator</div><div>                              declaration-specifiers abstract-declarator</div><div><br></div><div>direct-declarator [ <b>static</b> type-qualifier-listopt assignment-expression ]</div>



</blockquote><div><div><br></div><div><div>where The optional type qualifiers and the keyword <b>static </b>shall appear only in a declaration of a function parameter with an array type, and then only in the outermost</div>



<div>array type derivation and then for each call to the function, the value of the corresponding actual argument shall provide access to the first element of an array with at least as many elements as specified by the size expression.</div>



</div></div><div><br></div><div>for example : int func(array[static int i =100) ;</div><div><br></div><div>I'm trying to get  the test case for the above function prototype ??? Please someone can shed some lights here ??</div>


</blockquote><div><br></div></div></div><div>I'm not sure what you're looking for, but there are a few errors in your example, which might be hindering you. Try:</div><div><br></div><div>  int func(int array[static 100]);</div>


<div><br></div><div>Clang has some test cases for this in test/Sema/static-array.c.</div></div>
</blockquote></div><br></div></div>
_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><span class="HOEnZb"><font color="#888888"><br>
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><div>
<span style="border-collapse:separate;border-spacing:0px"><div>-- Jean-Daniel</div><div><br></div><div><br></div></span><br>

</div>
<br></font></span></div></div></div></blockquote></div><br></div>