develooper Front page | perl.perl5.porters | Postings from September 2017

Re: It would be nice to have a porting test that checks that macroarguments involved in expressions are parenthesized

Thread Previous | Thread Next
From:
Karl Williamson
Date:
September 20, 2017 21:05
Subject:
Re: It would be nice to have a porting test that checks that macroarguments involved in expressions are parenthesized
Message ID:
32aaa758-73ab-a83d-8bb0-9b007309cf36@khwilliamson.com
On 09/20/2017 09:38 AM, Father Chrysostomos wrote:
> Karl Williamson wrote:
>> On 09/15/2017 07:01 AM, Father Chrysostomos wrote:
>>> Karl Williamson wrote:
>>>> In case someone is so moved.
>>>
>>> Exceptions would have to be made for macros like DEBUG_S_warn in op.c.
>>>
>>
>> I don't see any operations where those arguments could have precedence
>> issues in the definition of that macro.
> 
> Precisely.  That macro must *not* have parentheses around 'args', but
> a naive porting test would flag it.  That is why a porting test would
> need an exceptions list.
> 

I was hoping that the writer would do better than naive.  That's better 
than an exception list that must be maintained.

Thread Previous | Thread Next


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