On 02/08/2012 06:32 PM, Sisyphus 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.
And which compiler you use. They may be using a gcc from VxWorks...
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.
Oh Inline::C worked fine. It's just when they compiled it with their
gcc it would spit out an error or warning and they'd get dinged.
(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
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.)
They wanted me to rewrite their source files on the fly as a workaround.
I asked them "How do I do that when the file is under Clearcase and not
writable?". I told them "The right solution would be to get Inline::C
(or actually Parse::RecDesent) fixed". I have since left that contract
but I still pursue it somewhat in the interest of professionalism.
--
Andrew DeFaria <http://defaria.com>
Try not to let your mind wander. it's too small and fragile to be out by
itself.