On 2010-04-03, at 8:39 PM, Philip M. Gollucci wrote:
> What ANSI C std is that?
>
> perl core code and fbsd code do this all over the place. They are
> supposedly C-99.
> On 4/2/2010 4:40 PM, Philippe M. Chiasson wrote:
>>
>> In ANSI C you can't define variables in blocks, like
>>
>> int foo(void) {
>> int a = 2;
>> some code
>> {
>> int b = 3;
>> more code
>> }
>>
>> So the below patch fixes that by making the rc status variable global
>> to the function. I compile with -Wall -Werror and it tends to pick these
>> up.
I'm not sure about the standards, but VC++ on Windows definitely doesn't like
code coming before declarations in a function like in the above.
--
best regards,
Randy
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]