perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <randy.ko...@gmail.com>
Subject Re: simplify mod_perl.c a bit
Date Sun, 04 Apr 2010 03:46:36 GMT
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: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message