Newsgroups: comp.archives Path: utzoo!utgpu!news-server.csri.toronto.edu!math.lsa.umich.edu!caen!ox.com!emv From: fuchs@it.uka.de (Harald Fuchs) Subject: [perl] Re: perl bugs in pl41 Message-ID: <1990Dec6.062918.7832@ox.com> Followup-To: comp.lang.perl Keywords: bugs perl41 Sender: emv@ox.com (Edward Vielmetti) Reply-To: fuchs@it.uka.de (Harald Fuchs) Organization: University of Karlsruhe, FRG References: <39929@genrad.UUCP> Date: Thu, 6 Dec 90 06:29:18 GMT Approved: emv@ox.com (Edward Vielmetti) X-Original-Newsgroups: comp.lang.perl Archive-name: gnu/gcc/pmax/1990-12-06 Archive: foobar.colorado.edu:/pub/Gnu-For-Pmax [128.138.243.105] Original-posting-by: fuchs@it.uka.de (Harald Fuchs) Original-subject: Re: perl bugs in pl41 Reposted-by: emv@ox.com (Edward Vielmetti) rep@genrad.com (Pete Peterson) writes: > The following bugs all exist in perl 3.41 on all platforms unless otherwise >noted. >There is a bug on the pmax (decstation) which appears to relate to integers >with the MSB set. The following works fine on suns and vaxes but fails in >different ways with perl 3/18 and perl 3/41 on the pmaxen: >printf (" %x, %x, %x, %x\n", 0xffffffff, 0xf0000000, 0x81234567, ~0xffff); >printf (" %x, %x, %x\n", 0xfffffff<<4, 15 << 28, ~1); >$a = 0xffff0000 & 7; $b = 15 << 28 & 7; print " a is $a; b is $b\n"; >Should print (and does except on pmax): > ffffffff, f0000000, 81234567, ffff0000 > fffffff0, f0000000, fffffffe > a is 0; b is 0 >-------------------- >In perl41 on pmax, you get: > 7fffffff, 7fffffff, 7fffffff, 7fffffff > fffffff0, f0000000, 7fffffff > a is 7; b is 0 >-------------------- >In perl18 on pmax, you get: > ffffffff, f0000000, 81234567, 7fffffff > fffffff0, f0000000, 7fffffff > a is 0; b is 0 >This problem can be worked around by editing config.sh, at the end of >running Configure, to make "d_castneg='undef'". Alternatively, you could use a reasonable C compiler, e.g. gcc-osf-1.9.2.13.tar.Z from foobar.colorado.edu. I compiled perl with this gcc (even with -O!) and the script above returned the correct results. -- Harald Fuchs ... *gulp* Brought to you by Super Global Mega Corp .com