Menu

#2309 Compiler warings w tcl8.4.2, gcc 3.3, libc 2.3.2

obsolete: 8.4.2
closed-works-for-me
8
2003-10-03
2003-04-28
Rolf Ade
No

Compiling tcl.8.4.2 with gcc 3.3 libc 2.3.2 gives this
warnings:

../unix/tclUnixFCmd.c: In function `CopyFile':
../unix/tclUnixFCmd.c:471: warning: comparison between
signed and unsigned
../unix/tclUnixFCmd.c:474: warning: comparison between
signed and unsigned
../unix/tclUnixFCmd.c:482: warning: comparison between
signed and unsigned

In file included from ../generic/regcomp.c:2175:
../generic/regc_locale.c: In function `cclass':
../generic/regc_locale.c:788: warning: comparison
between signed and unsigned
../generic/regc_locale.c:791: warning: comparison
between signed and unsigned
../generic/regc_locale.c:795: warning: comparison
between signed and unsigned
../generic/regc_locale.c:804: warning: comparison
between signed and unsigned
../generic/regc_locale.c:808: warning: comparison
between signed and unsigned
../generic/regc_locale.c:832: warning: comparison
between signed and unsigned
../generic/regc_locale.c:841: warning: comparison
between signed and unsigned
../generic/regc_locale.c:845: warning: comparison
between signed and unsigned
../generic/regc_locale.c:870: warning: comparison
between signed and unsigned
../generic/regc_locale.c:874: warning: comparison
between signed and unsigned
../generic/regc_locale.c:882: warning: comparison
between signed and unsigned
../generic/regc_locale.c:886: warning: comparison
between signed and unsigned
../generic/regc_locale.c:894: warning: comparison
between signed and unsigned
../generic/regc_locale.c:898: warning: comparison
between signed and unsigned
../generic/regc_locale.c:906: warning: comparison
between signed and unsigned
../generic/regc_locale.c:910: warning: comparison
between signed and unsigned

Looks like, size_t is unsigned (as it should be, but
not always was on all systems in the past). Most of the
warnings looks like oversensibility of gcc 3.3, but at
least unix/tclUnixFCmd.c, 471 compares a size_t with -1.

Discussion

  • Donal K. Fellows

    • labels: --> 37. File System
    • assigned_to: nobody --> vincentdarley
     
  • Donal K. Fellows

    • milestone: --> obsolete: 8.4.2
     
  • Vince Darley

    Vince Darley - 2003-09-16
    • assigned_to: vincentdarley --> hobbs
     
  • Vince Darley

    Vince Darley - 2003-09-16

    Logged In: YES
    user_id=32170

    I'm not particularly a unix person, so I'll pass this on to
    Jeff as filesystem maintainer and unix guru... Looks like a
    simple fix to someone who knows what they're doing!

     
  • Don Porter

    Don Porter - 2003-10-02
    • priority: 5 --> 8
    • assigned_to: hobbs --> jenglish
     
  • Joe English

    Joe English - 2003-10-03
    • status: open --> open-works-for-me
     
  • Joe English

    Joe English - 2003-10-03

    Logged In: YES
    user_id=68433

    Current HEAD and core-8-4-branch no longer get these
    warnings under gcc 3.3.2/glibc 2.3.2 (Debian testing) or gcc
    3.2/glibc 2.3.2 (Red Hat 8.0).

    The only compiler errors now are a handful of complaints
    like:

    tclUnixChan.c 2292 passing arg 1 of `ntohs' with
    different width due to prototype

    all about code like "ntohs(addr.sin_port)", where addr is a
    struct sockaddr_in. That's correct usage; gcc is only
    complaining because autoconf specifies "-Wconversion".

     
  • Joe English

    Joe English - 2003-10-03
    • status: open-works-for-me --> closed-works-for-me