On Wed, Feb 8, 2012 at 8:32 PM, Sisyphus <sisyph...@optusnet.com.au> wrote:

>
> ----- Original Message ----- From: "Andrew DeFaria"
>
>  It's not me that wants it - was my former client. They had a requirement
>> to use (void) parms (I don't know why - it was my understanding that ()
>> parms issue only a warning but they claimed their compiler treated it as an
>> error - maybe it was just a dictate to get rid of warnings).
>>
>
> I guess it depends upon the flags the compiler uses.
> With the compilers/flags that I use, I haven't even seen any warnings.
> For me the build succeeds, but the created xs file is botched in such a
> way that the Inline functions are not found at runtime.
>
>
>  (void) is valid syntax and I see no reason why it should not be supported.
>>
>
> Agreed.
>
> This was first raised in a bug report (that's still open) 8 years ago:
> https://rt.cpan.org/Public/**Bug/Display.html?id=5465<https://rt.cpan.org/Public/Bug/Display.html?id=5465>
>
> Just looking at it again, I find (to my surprise) that I found a fix for
> this a few years ago. (I remember looking at it previously ... but had
> forgotten about any progress that I made.)
>
> As I mention there, my "fix" doesn't inspire me with any great confidence,
> so I didn't take it any further.
> It just replaces the "(void)" in the code with "()" ... and probably would
> not have satisfied your client even if it has no nasty side-effects.
>
> Interesting that it "worked" .... probably not the right approach, but.
> Might be better to fix the parsing of $o->{ILSM}{code}, methinks ;-)
>
> I might see if I can discover something with ParseRegExp.pm. (I don't
> understand P::RD at all.)
>
> Cheers,
> Rob
>

Parse::RecDescent is surprisingly powerful and a lot of fun, but I've read
that it does not perform well on large matches. I'm pretty sure that adding
support for (void) would be easier to accomplish with P::RD, but from a
dependency standpoint I wonder if there is any reason we don't just switch
over entirely to ParseRegExp.pm.

David

-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan

Reply via email to