Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
OWC meets 5.17.5
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  6 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
NormW  
View profile  
 More options Nov 13 2012, 4:30 pm
Newsgroups: perl.perl5.porters
From: no...@gknw.net (NormW)
Date: Wed, 14 Nov 2012 08:17:25 +1100
Local: Tues, Nov 13 2012 4:17 pm
Subject: OWC meets 5.17.5
Hi,
Compiling the 5.17.5 source with OpenWatcom 1.9 and see a couple of
'new' warnings not noted in 5.17.4...

> ..\regexec.c(3607): Warning! W200: 'multicall_cop' has been referenced but never assigned a value
> ..\regexec.c(3608): Warning! W200: 'newsp' has been referenced but never assigned a value
>     PERL_UNUSED_VAR(multicall_cop);
>     PERL_UNUSED_VAR(newsp);

A compiler foible perhaps?
Norm

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Mitchell  
View profile  
 More options Nov 20 2012, 10:15 am
Newsgroups: perl.perl5.porters
From: da...@iabyn.com (Dave Mitchell)
Date: Tue, 20 Nov 2012 14:53:25 +0000
Local: Tues, Nov 20 2012 9:53 am
Subject: Re: OWC meets 5.17.5

Actually they were added by Jesse Luehrs in 4f8dbb2da to get rid of
"set but not used" warnings.

> for dMULTICALL, set later in CHANGE_MULTICALL_WITHDEPTH and
> PUSH_MULTICALL_WITHDEPTH,
> but not set in the failing case for (newcv != last_pushed_cv ||
> PL_comppad != last_pad)

> clang and gcc get pleased with PERL_UNUSED_VAR, which is ((void)multicall_cop);
> Watcom is apparently better, as reading and writing is different.

> Better would be to set these to NULL as done in my attached patch.

Your patch removes the PERL_UNUSED_VAR's which will cause the
'set but not used' warnings to return under gcc etc.

The part of your patch that assigns null to those variables may silence
the OpenWatcom warnings, but they are unnecessary to the code logic,
because these variables are in fact never used (just assigned to
sometimes).

> Tests still fail all over, but this is blead.

patches welcome....

--
Counsellor Troi states something other than the blindingly obvious.
    -- Things That Never Happen in "Star Trek" #16


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Reini Urban  
View profile  
 More options Nov 20 2012, 4:45 pm
Newsgroups: perl.perl5.porters
From: rur...@x-ray.at (Reini Urban)
Date: Tue, 20 Nov 2012 15:31:07 -0600
Local: Tues, Nov 20 2012 4:31 pm
Subject: Re: OWC meets 5.17.5

To reperat myself and as I said in the commit message:
"regexec MULTICALL do not outsmart compiler warnings

OpenWatcom 1.9 for example is not fooled by the ((void)multicall_cop);
expression.
Correctly initialize the two new variables for the failing init case."

The init case may fail (newcv != last_pushed_cv || PL_comppad != last_pad)
and that's why the compilers warn.
--
Reini Urban
http://cpanel.net/   http://www.perl-compiler.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Mitchell  
View profile  
 More options Nov 20 2012, 5:30 pm
Newsgroups: perl.perl5.porters
From: da...@iabyn.com (Dave Mitchell)
Date: Tue, 20 Nov 2012 22:18:24 +0000
Local: Tues, Nov 20 2012 5:18 pm
Subject: Re: OWC meets 5.17.5

And I'll repeat myself.

Those variables are assigned to in some (but not all) branches,
but those assigned values are *never* used. So assigning NULL to them in
the remaining branch is purely cosmetic, to shut up spurious compiler
warnings.

Thus, the current situation is that:

* the code is logically correct, in that the variables can never be used
  uninitialised;
* In order to shut up harmless warnings with gcc etc, the PERL_UNUSED_VAR
  were added.

Under your proposed patch,

* the code performs two logically unnecessary initialisations each time
  round the loop;
* shuts up a harmless warning with OpenWatcom;
* re-introduces a harmless warning with gcc etc

So the net effect of your patch is:

* makes no logical change to the code;
* makes the code slightly slower;
* makes it generate harmless warnings on common compilers while silencing
  a harmless warning on an obscure compiler.

--
More than any other time in history, mankind faces a crossroads. One path
leads to despair and utter hopelessness. The other, to total extinction.
Let us pray we have the wisdom to choose correctly.
    -- Woody Allen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bulk88  
View profile  
 More options Nov 20 2012, 8:15 pm
Newsgroups: perl.perl5.porters
From: bul...@hotmail.com (bulk88)
Date: Tue, 20 Nov 2012 20:05:43 -0500
Local: Tues, Nov 20 2012 8:05 pm
Subject: Re: OWC meets 5.17.5
Dave Mitchell wrote:
> Under your proposed patch,

> * the code performs two logically unnecessary initialisations each time
>   round the loop;

................................

> So the net effect of your patch is:

> * makes no logical change to the code;
> * makes the code slightly slower;

..............................


If an auto, a const assignment to it, if never read, and never &ed of,
will be removed by any decent compiler with dead code elimination. For
example, this line (and more lines with "dTHXa(NULL);" scattered
throughout the Perl Win32 layer) I wrote, the NULL assignments disappear
if anything O level other than 0/debug is used with Visual C, which
isn't exactly at the top of best C compilers on earth list.

http://perl5.git.perl.org/perl.git/blob/0af431d354c3a5b78e68b53f23008...


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dave Mitchell  
View profile  
 More options Nov 21 2012, 1:45 pm
Newsgroups: perl.perl5.porters
From: da...@iabyn.com (Dave Mitchell)
Date: Wed, 21 Nov 2012 18:28:16 +0000
Local: Wed, Nov 21 2012 1:28 pm
Subject: Re: OWC meets 5.17.5

Good point.

I've applied the part of Reini's patch that does the two NULL assignments,
but skipped the part that removed the two PERL_UNUSED_VAR's.

c31ee3bbc31a4f8c5b4850ce38fb8c353dca688f

--
Wesley Crusher gets beaten up by his classmates for being a smarmy git,
and consequently has a go at making some friends of his own age for a
change.
    -- Things That Never Happen in "Star Trek" #18


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »