Hi Thomas,<br><div class="gmail_quote"><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
On Dec 21, 2009, at 6:03 PM, Mickael Auger wrote:<br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">
On Dec 21, 2009, at 5:01 PM, Mickael Auger wrote:<br></div><div class="im">
- the declaration of &quot;int i&quot; should be at the beginning of function in C strict<br>
<br>
what do you mean exactly by &quot;C strict&quot; ?  As far as I know the code in U_CONFIG_INDENT is ok in ANSI C (and later): the &#39;i&#39; inside the &#39;do {...} while (0)&#39; is usually called a block (or local) identifier and its visibility extends from its declaration point inside the block to the end of the same block.  I&#39;ve not managed to find a K&amp;R-able compiler to test if it works with very old C, but I don&#39;t see any problem in principle.  Have you tried with a specific compiler ?<br>


<br>
I use &quot;m68k-elf-gcc&quot; and I can not compile :<br>
=======================<br>
#include &lt;stdio.h&gt;<br>
int main(int argc, char *argv[])<br>
{<br>
  printf(&quot;coucou\n&quot;);<br>
  int i;               //---&gt;after<br>
  i=5;<br>
  return 0;<br>
}<br>
=======================<br>
but I can compile :<br>
=======================<br>
#include &lt;stdio.h&gt;<br>
int main(int argc, char *argv[])<br>
{<br>
  int i;               //----&gt; before<br>
  printf(&quot;coucou\n&quot;);<br>
  i=5;<br>
  return 0;<br>
}<br>
=======================<br>
The declaration of &quot;int&quot; (and all declarations) must be the first instruction before other operations.<br>
I call it the &quot;C strict&quot; (all declarations before all operations).<br>
</div></blockquote>
<br>
yes that&#39;s right, but the &#39;int i;&#39; declaration created by the U_CONFIG_INDENT macro is visible only inside the block created by the braces in the &#39;do ... while&#39; loop and does not mess up with the rest of the function body.  Could you try this with your gcc 2.95, please:<br>


<br>
#include &lt;stdio.h&gt;<br>
int main (void)<br>
{<br>
   printf(&quot;coucou\n&quot;);<br>
<br>
   {<br>
      int i = 5;<br>
   }<br>
<br>
   return 0;<br>
}<br>
<br></blockquote><div>The compilation of this it&#39;s good with gcc and with m68-elf-gcc.<br><br>Thank&#39;s for your lesson ;)<br><br clear="all"></div></div><span id="result_box" class="short_text"><span style="background-color: rgb(235, 239, 249);" title="je me coucherai moins bête ce soir">-- I will sleep less stupid tonight</span></span> --<br>

<br>-- <br>Mickaël AUGER<br><br>