develooper Front page | perl.perl5.porters | Postings from May 2001

Re: Making perl with -Wall

Thread Previous | Thread Next
From:
Nick Ing-Simmons
Date:
May 24, 2001 07:12
Subject:
Re: Making perl with -Wall
Message ID:
20010524141306.10282.2@dromedary.ni-s.u-net.com
Michael G Schwern <schwern@pobox.com> writes:
>On Thu, May 24, 2001 at 09:56:05AM +0000, Nick Ing-Simmons wrote:
>> >Out of perverse curiousity, I compiled perl with -Wall enabled.
>> >Didn't come out too badly if you ignore the several thousand "warning:
>> >unused variable `Perl___notused'" warnings.  What is that?  Some sort
>> >of no-op.
>> 
>> There is a GCC attribute that will silence the warning
>
>What about all the other compilers?

We don't know how to do -Wall on other compilers ;-)
Though I agree some of them are noisy in this area by default.

>
>
>> - with sutable #define we could add that to the dXXXX in question.
>> I suspect if you build with -DMULTIPLICITY the thing will be used
>> and warnings will go away.
>
>Well, what I'm more curious about is why we have a variable called
>"Perl___notused" at all and not simply an empty macro?

Because it is a declaration, and there is a following ';'.

e.g.
{
 dTHX;
 int foo;
}

would become:
{;
 int foo;
}

is a syntax error in C.


-- 
Nick Ing-Simmons
who is looking for a new job see http://www.ni-s.u-net.com/


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