develooper Front page | perl.perl5.porters | Postings from April 2003

Compiler warnings in SuSE 8.2

From:
andreas.koenig
Date:
April 7, 2003 22:47
Subject:
Compiler warnings in SuSE 8.2
Message ID:
m3d6jx4k1v.fsf@franz.ak.mind.de
I have access to a SuSE 8.2 system which comes with glibc 2.3.2 and a
gcc 3.3 prerelease. Compiling blead or the 5.8.1 branch emit lots of
warnings, but all tests pass.

Here's the output of compiling the 5.8.1 branch followed by perl -V:


`sh  cflags "optimize='-O3'" miniperlmain.o`  miniperlmain.c
          CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" perl.o`  perl.c
          CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
perl.c: In function `S_parse_body':
perl.c:1278: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" gv.o`  gv.c
          CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -
D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
gv.c: In function `Perl_gv_fetchpv':
gv.c:668: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" toke.o`  toke.c
          CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
toke.c: In function `S_pending_ident':
toke.c:5292: warning: comparison between signed and unsigned
toke.c: In function `S_scan_inputsymbol':
toke.c:6716: warning: comparison between signed and unsigned
toke.c:6779: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" perly.o`  perly.c
          CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" op.o`  op.c
          CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
op.c: In function `Perl_pmtrans':
op.c:2505: warning: comparison is always true due to limited range of data type
op.c:2505: warning: comparison is always true due to limited range of data type
op.c: In function `Perl_newASSIGNOP':
op.c:3222: warning: comparison between signed and unsigned
op.c: In function `Perl_peep':
op.c:6455: warning: signed and unsigned type in conditional expression
op.c:6475: warning: signed and unsigned type in conditional expression
op.c:6541: warning: signed and unsigned type in conditional expression
`sh  cflags "optimize='-O3'" pad.o`  pad.c
          CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" regcomp.o`  regcomp.c
          CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" dump.o`  dump.c
          CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
dump.c: In function `Perl_sv_peek':
dump.c:300: warning: signed and unsigned type in conditional expression
dump.c: In function `Perl_do_sv_dump':
dump.c:1128: warning: signed and unsigned type in conditional expression
dump.c:1221: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" util.o`  util.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
util.c: In function `htovs':
util.c:1763: warning: comparison between signed and unsigned
util.c: In function `htovl':
util.c:1766: warning: comparison between signed and unsigned
util.c: In function `vtohs':
util.c:1769: warning: comparison between signed and unsigned
util.c: In function `vtohl':
util.c:1772: warning: comparison between signed and unsigned
util.c: In function `Perl_my_popen_list':
util.c:1876: warning: comparison between signed and unsigned
util.c: In function `Perl_my_popen':
util.c:2028: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" mg.o`  mg.c
CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
mg.c: In function `Perl_magic_setenv':
mg.c:968: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" reentr.o`  reentr.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" hv.o`  hv.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" av.o`  av.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" run.o`  run.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" pp_hot.o`  pp_hot.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" sv.o`  sv.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
sv.c: In function `Perl_sv_force_normal_flags':
sv.c:4229: warning: signed and unsigned type in conditional expression
sv.c: In function `Perl_sv_clear':
sv.c:5163: warning: signed and unsigned type in conditional expression
sv.c: In function `Perl_sv_pos_b2u':
sv.c:5628: warning: comparison between signed and unsigned
sv.c:5634: warning: comparison between signed and unsigned
sv.c: In function `Perl_sv_gets':
sv.c:6328: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" pp.o`  pp.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
pp.c: In function `Perl_pp_complement':
pp.c:2423: warning: comparison between signed and unsigned
pp.c: In function `Perl_pp_ord':
pp.c:3356: warning: signed and unsigned type in conditional expression
pp.c: In function `Perl_pp_split':
pp.c:4512: warning: signed and unsigned type in conditional expression
`sh  cflags "optimize='-O3'" scope.o`  scope.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" pp_ctl.o`  pp_ctl.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
pp_ctl.c: In function `Perl_pp_formline':
pp_ctl.c:688: warning: signed and unsigned type in conditional expression
pp_ctl.c:724: warning: signed and unsigned type in conditional expression
`sh  cflags "optimize='-O3'" pp_sys.o`  pp_sys.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
pp_sys.c: In function `Perl_pp_sysread':
pp_sys.c:1639: warning: comparison between signed and unsigned
pp_sys.c: In function `Perl_pp_system':
pp_sys.c:4100: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" doop.o`  doop.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
doop.c: In function `S_do_trans_complex':
doop.c:219: warning: signed and unsigned type in conditional expression
doop.c: In function `Perl_do_vecget':
doop.c:760: warning: comparison between signed and unsigned
doop.c:762: warning: comparison between signed and unsigned
doop.c:765: warning: comparison between signed and unsigned
doop.c:769: warning: comparison between signed and unsigned
doop.c:774: warning: comparison between signed and unsigned
doop.c:780: warning: comparison between signed and unsigned
doop.c:787: warning: comparison between signed and unsigned
doop.c: In function `Perl_do_vop':
doop.c:1115: warning: signed and unsigned type in conditional expression
doop.c:1130: warning: signed and unsigned type in conditional expression
doop.c:1200: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" doio.o`  doio.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
doio.c: In function `Perl_do_ipcctl':
doio.c:1969: warning: comparison between signed and unsigned
doio.c:1974: warning: comparison between signed and unsigned
doio.c: In function `Perl_do_shmio':
doio.c:2154: warning: comparison between signed and unsigned
doio.c:2166: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" regexec.o`  regexec.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
regexec.c: In function `S_find_byclass':
regexec.c:1162: warning: signed and unsigned type in conditional expression
regexec.c:1205: warning: signed and unsigned type in conditional expression
regexec.c: In function `S_regmatch':
regexec.c:2546: warning: signed and unsigned type in conditional expression
regexec.c:2569: warning: signed and unsigned type in conditional expression
regexec.c:2634: warning: signed and unsigned type in conditional expression
regexec.c:2664: warning: signed and unsigned type in conditional expression
regexec.c:2687: warning: signed and unsigned type in conditional expression
regexec.c:2710: warning: signed and unsigned type in conditional expression
`sh  cflags "optimize='-O3'" utf8.o`  utf8.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" taint.o`  taint.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" deb.o`  deb.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" universal.o`  universal.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" xsutils.o`  xsutils.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" globals.o`  globals.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" perlio.o`  perlio.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
perlio.c: In function `PerlIOBase_read':
perlio.c:2001: warning: signed and unsigned type in conditional expression
`sh  cflags "optimize='-O3'" perlapi.o`  perlapi.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" numeric.o`  numeric.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
numeric.c: In function `Perl_grok_numeric_radix':
numeric.c:488: warning: signed and unsigned type in conditional expression
numeric.c: In function `Perl_my_atof':
numeric.c:793: warning: signed and unsigned type in conditional expression
`sh  cflags "optimize='-O3'" locale.o`  locale.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
`sh  cflags "optimize='-O3'" pp_pack.o`  pp_pack.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
pp_pack.c: In function `S_unpack_rec':
pp_pack.c:1320: warning: comparison between signed and unsigned
pp_pack.c:1381: warning: comparison between signed and unsigned
pp_pack.c:1576: warning: comparison between signed and unsigned
`sh  cflags "optimize='-O3'" pp_sort.o`  pp_sort.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
rm -f libperl.a
/usr/bin/ar rcu libperl.a perl.o  gv.o toke.o perly.o op.o pad.o regcomp.o dump.o util.o mg.o reentr.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o locale.o pp_pack.o pp_sort.o 
rm -f opmini.c
cp op.c opmini.c
`sh  cflags "optimize='-O3'" opmini.o`  -DPERL_EXTERNAL_GLOB opmini.c
  CCCMD =  cc -DPERL_CORE -c -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3  -Wall
opmini.c: In function `Perl_pmtrans':
opmini.c:2505: warning: comparison is always true due to limited range of data type
opmini.c:2505: warning: comparison is always true due to limited range of data type
opmini.c: In function `Perl_newASSIGNOP':
opmini.c:3222: warning: comparison between signed and unsigned
opmini.c: In function `Perl_peep':
opmini.c:6455: warning: signed and unsigned type in conditional expression
opmini.c:6475: warning: signed and unsigned type in conditional expression
opmini.c:6541: warning: signed and unsigned type in conditional expression


# /usr/local/perl-m-5.8.0@19161/bin/perl -V
Summary of my perl5 (revision 5.0 version 8 subversion 1) configuration:
  Platform:
    osname=linux, osvers=2.4.20-4gb, archname=i686-linux-64int
    uname='linux pc5203 2.4.20-4gb #1 mon mar 17 17:54:44 utc 2003 i686 unknown unknown gnulinux '
    config_args='-Dprefix=/usr/local/perl-m-5.8.0@19161 -Dinstallusrbinperl=n -Uversiononly -des -Duse64bitint -Dusedevel'
    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=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O3',
    cppflags='-fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='3.3 20030226 (prerelease) (SuSE Linux)', 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='cc', ldflags =' -L/usr/local/lib'
    libpth=/usr/local/lib /lib /usr/lib
    libs=-lnsl -ldl -lm -lc -lcrypt -lutil -lrt
    perllibs=-lnsl -ldl -lm -lc -lcrypt -lutil -lrt
    libc=, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version='2.3.2'
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic'
    cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl): 
  Compile-time options: USE_64_BIT_INT USE_LARGE_FILES
  Locally applied patches:
        MAINT19040
  Built under linux
  Compiled at Apr  8 2003 08:25:35
  @INC:
    /usr/local/perl-m-5.8.0@19161/lib/5.8.1/i686-linux-64int
    /usr/local/perl-m-5.8.0@19161/lib/5.8.1
    /usr/local/perl-m-5.8.0@19161/lib/site_perl/5.8.1/i686-linux-64int
    /usr/local/perl-m-5.8.0@19161/lib/site_perl/5.8.1
    /usr/local/perl-m-5.8.0@19161/lib/site_perl
    .





-- 
andreas



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