[Haifux] Intermingled code and declarations and gcc

Orna Agmon Ben-Yehuda ladypine at gmail.com
Thu Sep 17 16:20:48 MSD 2009


Another workaround : You may also add {} such that the definition is
the first line in it. It is not so scary to do such a change...

   /* count number of environment variables currently set */

   unsigned int envar_count;

   for (envar_count=0; envp[envar_count] != NULL; envar_count++);
{
   char *child_envp[envar_count];
.....
}


On Thu, Sep 17, 2009 at 3:54 PM, Eli Billauer <eli at billauer.co.il> wrote:
> Hi,
>
>
> Thanks, even though it didn't help. The same error message appeared,
> despite the flag.
>
>
> BTW, gcc version 3.0.4 compiled the *example* neatly with or without the
> flag (but not the code I need to compile, because it has other
> issues...). Surprise, surprise.
>
>
>  Eli
>
>
>
> Vadim Eisenberg wrote:
>
>> Hi Eli,
>>
>> Try -std=c99 flag. The C99 standard allows declarations everywhere.
>>
>> Shana Tova,
>> Vadim
>>
>>
>
> --
> Web: http://www.billauer.co.il
>
> _______________________________________________
> Haifux mailing list
> Haifux at haifux.org
> http://hamakor.org.il/cgi-bin/mailman/listinfo/haifux
>



More information about the Haifux mailing list