develooper Front page | perl.perl5.porters | Postings from January 2013

Re: [perl #116557] commit 8a45afe5 uses a WinCE SDK MS reservedword/macro

Thread Previous
From:
Dave Mitchell
Date:
January 30, 2013 16:46
Subject:
Re: [perl #116557] commit 8a45afe5 uses a WinCE SDK MS reservedword/macro
Message ID:
20130130164640.GP2066@iabyn.com
On Mon, Jan 28, 2013 at 01:44:24AM -0800, bulk88 wrote:
> This commit 
> http://perl5.git.perl.org/perl.git/commit/8a45afe535d962511dc34619dcdb405aeff849da?f=op.c 
> created a variable with the name "leave".

Well strictly speaking it was an earlier commit, but...

> In embedded VC 4's SDK's 
> headers there is
> 
> #define leave                           __leave

> So what is done when OS headers turn non-macro looking things into 
> macros? Does Perl avoid using that macro/token/identifier, or does Perl 
> undef "bad" OS defines (and this leave/try/except/finally stuff is a 
> "bad" OS define)? The current situation is a bug.

I took the path of least resistance and renamed the variable, with commit

    106d2451aadbd20e554aed6fb9fa741f230dce4b

(which also caused me to spot an error in an assertion I had included in
that code; fixed with:

    3543180891f3f92865013baa141cb867c503a862

)

-- 
In England there is a special word which means the last sunshine
of the summer. That word is "spring".

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About