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

[perl #117835] Pointer cast to integer of different size in hv_func.h

Thread Next
From:
Robin Barker
Date:
May 2, 2013 10:14
Subject:
[perl #117835] Pointer cast to integer of different size in hv_func.h
Message ID:
rt-3.6.HEAD-28177-1367489642-1973.117835-75-0@perl.org
# New Ticket Created by  Robin Barker 
# Please include the string:  [perl #117835]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=117835 >


This is a bug report for perl from rmbarker.cpan@btinternet.com,
generated with the help of perlbug 1.39 running under perl 5.17.12.


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

When compiling perl, I get many warnings about the same line in
hv_func.h.  The warnings would be silenced by the use of PTR2IV.

The attached patch, also changes the type of the variable on that
line, because it cast to STRLEN the first time it is used, and then
passed to a macro that assigns it to an int regardless.

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

Configured by robin at Wed May  1 12:59:24 BST 2013.

Summary of my perl5 (revision 5 version 17 subversion 12) configuration:
   Commit id: 8257347d5f11b9bd1df15345570993538c8b1696
   Platform:
     osname=linux, osvers=3.0.0-32-generic, archname=i686-linux-64int
     uname='linux king-ubuntu 3.0.0-32-generic #51-ubuntu smp thu mar 21 
15:51:26 utc 2013 i686 athlon i386 gnulinux '
     config_args='-ders -Dcc=gcc -Dusedevel -Doptimize=-O2 -DDEBUGGING 
-Duse64bitint -Dman3dir=none -Dcf_email=rmbarker.cpan@btinternet.com'
     hint=recommended, useposix=true, d_sigaction=define
     useithreads=undef, usemultiplicity=undef
     useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
     use64bitint=define, use64bitall=undef, uselongdouble=undef
     usemymalloc=n, bincompat5005=undef
   Compiler:
     cc='gcc', ccflags ='-DDEBUGGING -fno-strict-aliasing -pipe 
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64',
     optimize='-O2 -g',
     cppflags='-DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector 
-I/usr/local/include'
     ccversion='', gccversion='4.6.4', gccosandvers=''
     intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
     d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
     ivtype='long long', ivsize=8, nvtype='double', nvsize=8, 
Off_t='off_t', lseeksize=8
     alignbytes=4, prototype=define
   Linker and Libraries:
     ld='gcc', ldflags =' -fstack-protector -L/usr/local/lib'
     libpth=/usr/local/lib /lib/i386-linux-gnu /lib/../lib 
/usr/lib/i386-linux-gnu /usr/lib/../lib /lib /usr/lib
     libs=-lnsl -ldl -lm -lcrypt -lutil -lc
     perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
     libc=, so=so, useshrplib=false, libperl=libperl.a
     gnulibc_version='2.13'
   Dynamic Linking:
     dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
     cccdlflags='-fPIC', lddlflags='-shared -O2 -g -L/usr/local/lib 
-fstack-protector'

Locally applied patches:


---
@INC for perl 5.17.12:
     lib
     /usr/local/lib/perl5/site_perl/5.17.12/i686-linux-64int
     /usr/local/lib/perl5/site_perl/5.17.12
     /usr/local/lib/perl5/5.17.12/i686-linux-64int
     /usr/local/lib/perl5/5.17.12
     .

---
Environment for perl 5.17.12:
     HOME=/home/robin
     LANG=en_GB.UTF-8
     LANGUAGE=en_GB:en
     LD_LIBRARY_PATH (unset)
     LOGDIR (unset)
PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
     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