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

[perl #133202] squaring a reference doesn't cause an error

Thread Previous
From:
Diab Jerius
Date:
May 15, 2018 21:08
Subject:
[perl #133202] squaring a reference doesn't cause an error
Message ID:
rt-4.0.24-10449-1526418522-702.133202-75-0@perl.org
# New Ticket Created by  Diab Jerius 
# Please include the string:  [perl #133202]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=133202 >



This is a bug report for perl from djerius@cpan.org,
generated with the help of perlbug 1.40 running under perl 5.22.1.


-----------------------------------------------------------------
[Please describe your issue here]

To my surprise, squaring a reference doesn't cause an error.


my $aref = [ 1, 2 ];
print $aref**2;

results in 

8.85955040890831e+27

I expected something to complain.

Thanks!

Diab



[Please do not change anything below this line]
-----------------------------------------------------------------
---
Flags:
    category=core
    severity=low
---
Site configuration information for perl 5.22.1:

Configured by dj at Mon Aug 14 10:53:52 EDT 2017.

Summary of my perl5 (revision 5 version 22 subversion 1) configuration:
   
  Platform:
    osname=linux, osvers=4.9.0-3-amd64, archname=x86_64-linux_debian-9-thread-multi
    uname='linux macabre 4.9.0-3-amd64 #1 smp debian 4.9.30-2+deb9u3 (2017-08-06) x86_64 gnulinux '
    config_args='-de -Dprefix=/proj/axaf/ots/pkgs/perl-5.22/x86_64-linux_debian-9 -Uinstallusrbinperl -Dperladmin=none -Dlocincpth=/proj/axaf/ots/include -Darchname=x86_64-linux_debian-9 -Dusethreads -Dotherlibdirs=/proj/axaf/simul/lib/perl5:/proj/axaf/simul/x86_64-linux_debian-9/lib/perl5 -Dloclibpth=/proj/axaf/ots/x86_64-linux_debian-9/lib -Dglibpth=/lib /usr/lib -Dldflags=-L/proj/axaf/ots/x86_64-linux_debian-9/lib -Wl,-rpath=/proj/axaf/ots/x86_64-linux_debian-9/lib -Duseshrplib'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=define, usemultiplicity=define
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/proj/axaf/ots/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O2',
    cppflags='-D_REENTRANT -D_GNU_SOURCE -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/proj/axaf/ots/include'
    ccversion='', gccversion='6.3.0 20170516', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-L/proj/axaf/ots/x86_64-linux_debian-9/lib -Wl,-rpath=/proj/axaf/ots/x86_64-linux_debian-9/lib -fstack-protector-strong'
    libpth=/usr/local/lib /usr/lib/gcc/x86_64-linux-gnu/6/include-fixed /usr/include/x86_64-linux-gnu /usr/lib /proj/axaf/ots/x86_64-linux_debian-9/lib /lib/x86_64-linux-gnu /lib/../lib /usr/lib/x86_64-linux-gnu /usr/lib/../lib /lib
    libs=-lpthread -lnsl -lgdbm -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
    perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
    libc=libc-2.24.so, so=so, useshrplib=true, libperl=libperl.so
    gnulibc_version='2.24'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/proj/axaf/ots/pkgs/perl-5.22/x86_64-linux_debian-9/lib/5.22.1/x86_64-linux_debian-9-thread-multi/CORE'
    cccdlflags='-fPIC', lddlflags='-shared -O2 -L/proj/axaf/ots/x86_64-linux_debian-9/lib -fstack-protector-strong'


---
@INC for perl 5.22.1:
    /proj/axaf/simul/lib/perl5
    /home/dj/research/lib/perl5
    /proj/axaf/ots/pkgs/perl-5.22/x86_64-linux_debian-9/lib/site_perl/5.22.1/x86_64-linux_debian-9-thread-multi
    /proj/axaf/ots/pkgs/perl-5.22/x86_64-linux_debian-9/lib/site_perl/5.22.1
    /proj/axaf/ots/pkgs/perl-5.22/x86_64-linux_debian-9/lib/5.22.1/x86_64-linux_debian-9-thread-multi
    /proj/axaf/ots/pkgs/perl-5.22/x86_64-linux_debian-9/lib/5.22.1
    /proj/axaf/simul/lib/perl5
    /proj/axaf/simul/x86_64-linux_debian-9/lib/perl5
    .

---
Environment for perl 5.22.1:
    HOME=/home/dj
    LANG=en_US.UTF-8
    LANGUAGE (unset)
    LD_LIBRARY_PATH=/soft/SYBASE15.7/DataAccess64/ODBC/lib:/soft/SYBASE15.7/DataAccess/ODBC/lib:/soft/SYBASE15.7/OCS-15_0/lib:/soft/SYBASE15.7/OCS-15_0/lib3p64:/soft/SYBASE15.7/OCS-15_0/lib3p:
    LOGDIR (unset)
    PATH=/home/dj/.plenv/libexec:/home/dj/.plenv/plugins/link-axaf/bin:/home/dj/.plenv/plugins/perl-build/bin:/home/dj/.plenv/plugins/plenv-contrib/bin:/soft/SYBASE15.7/OCS-15_0/bin:/home/dj/.rbenv/shims:/home/dj/.rbenv/bin:/home/dj/.pyenv/plugins/pyenv-virtualenv/shims:/home/dj/.pyenv/shims:/home/dj/.pyenv/bin:/home/dj/.plenv/shims:/home/dj/.plenv/bin:/home/dj/root/bin:/home/dj/root/bin/hosts:/home/dj/research/bin:/proj/axaf/ots/pkgs/perl-5.22/x86_64-linux_debian-9/bin:/proj/axaf/bin:/proj/axaf/simul/bin:/proj/axaf/simul/x86_64-linux_debian-9/bin:/proj/axaf/ots/x86_64-linux_debian-9/bin:/proj/axaf/ots/bin:/usr/local/bin:/usr/sbin:/bin:/usr/bin:/soft/saord/bin
    PERL5LIB=/proj/axaf/simul/lib/perl5:/home/dj/research/lib/perl5
    PERL_BADLANG (unset)
    SHELL=/bin/bash


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About