develooper Front page | perl.perl5.porters | Postings from March 2011

[perl #85822] precedence "and" "ne" does not match precedence declared in perlop

Thread Next
From:
badrazat @ ncbi . nlm . nih . gov
Date:
March 10, 2011 09:45
Subject:
[perl #85822] precedence "and" "ne" does not match precedence declared in perlop
Message ID:
rt-3.6.HEAD-4136-1299757999-1633.85822-75-0@perl.org
# New Ticket Created by  badrazat@ncbi.nlm.nih.gov 
# Please include the string:  [perl #85822]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=85822 >



This is a bug report for perl from badrazat@ncbi.nlm.nih.gov,
generated with the help of perlbug 1.35 running under perl v5.8.8.


-----------------------------------------------------------------
[Please enter your report here]

perl -e 'print 1 and "+" ne "+"; print "\n"'
1

while it should give "", because the precendence of "ne" is higher than "and". Instead it computes 1 and "+" which gives 1, and
compares it to "+" which gives 1 again.


[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=high
---
Site configuration information for perl v5.8.8:

Configured by <systems.unix@ncbi.nlm.nih.gov> at Thu Dec  2 16:20:14 EST 2010.

Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
  Platform:
    osname=linux, osvers=2.6.18-194.11.4.el5, archname=x86_64-linux
    uname='linux sock 2.6.18-194.11.4.el5 #1 smp tue sep 21 05:04:09 edt 2010 x86_64 x86_64 x86_64 gnulinux '
    config_args='-ds -e -Dprefix=/opt/perl-5.8.8 -Dsiteprefix=/opt/perl-5.8.8 -Dvendorprefix=/opt/perl-5.8.8 -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -pipe -fPIC -Dcf_by=<systems.unix@ncbi.nlm.nih.gov> -Dperladmin=unix.systems@ncbi.nlm.nih.gov -Duselargefiles -Dlibpth=/lib64 /usr/lib64 -des'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=define uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
    optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall -pipe -fPIC',
    cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/include/gdbm'
    ccversion='', gccversion='4.1.2 20080704 (Red Hat 4.1.2-48)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags =''
    libpth=/lib64 /usr/lib64
    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.5'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
    cccdlflags='-fPIC', lddlflags='-shared'

Locally applied patches:
    

---
@INC for perl v5.8.8:
    /opt/perl-5.8.8/lib/site_perl/5.8.8/x86_64-linux
    /opt/perl-5.8.8/lib/site_perl/5.8.8
    /opt/perl-5.8.8/lib/site_perl
    /opt/perl-5.8.8/lib/vendor_perl/5.8.8/x86_64-linux
    /opt/perl-5.8.8/lib/vendor_perl/5.8.8
    /opt/perl-5.8.8/lib/vendor_perl
    /opt/perl-5.8.8/lib/5.8.8/x86_64-linux
    /opt/perl-5.8.8/lib/5.8.8
    .

---
Environment for perl v5.8.8:
    HOME=/home/badrazat
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LC_ALL=POSIX
    LD_LIBRARY_PATH=/home/badrazat/FS_playground/16sRNA/ARBsoft/install/lib:/opt/gd-2.0.35/lib64
    LOGDIR (unset)
    PATH=/home/badrazat/FS_playground/16sRNA/ARBsoft/install/bin:/usr/lib64/qt-3.3/bin:/opt/python-2.5/bin:/opt/perl-5.8.8/bin:/opt/graphviz-2.16.1/bin:/usr/local/phylip/3.69/bin:/usr/local/hmmer/3.0/bin:/netopt/ncbi_tools64/bin:/usr/local/nedit/5.5/bin:/usr/local/mafft/6.716/bin:/usr/local/emacs/22.3/bin:/netopt/sge/bin/lx24-amd64:/netopt/genbank/subtool/bin:/am/ncbiapdata/bin:/usr/local/valgrind/3.5.0/bin:/usr/local/vim/7.2/bin:/usr/local/matlab/R2009a/bin:/usr/local/svnmucc/1.5.7/bin:/usr/local/jove/4.16.0.70/bin:/usr/local/toolworks/totalview.8.6.2-2/bin:/usr/local/joe/3.7/bin:/opt/panfs/bin:/usr/local/muscle/3.7/bin:/usr/local/tree-puzzle/5.2/bin:/usr/local/clustalx/1.83/bin:/usr/local/ctags/5.7/bin:/usr/local/gcc/4.4.2/bin:/usr/local/graphviz/2.24/bin:/usr/local/clustalw/1.83/bin:/usr/local/ddd/3.3.11/bin:/usr/local/gdb/6.8/bin:/export/home/sybase/clients/current/bin:/export/home/sybase/utils/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/export/home/sybase/utils/b
 in:/home/badrazat/bin:/home/borodovs/gmtools
    PERL_BADLANG (unset)
    SHELL=/bin/bash


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