Skip to content
Tcl Source Code View Ticket
Login

View Ticket

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

Closed / Works For Me729200ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 23 years ago
Descriptionplain2003-04-28 21:40:59
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.
dkf Ticket [729200ffff]: 2 changes [History diff]2003-09-16 02:48:40
dkf Ticket [729200ffff]: 1 change [History diff]2003-09-16 02:49:43
vincentdarleyplain2003-09-16 20:40:10
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!
dgp Ticket [729200ffff]: 2 changes [History diff]2003-10-03 05:16:40
jenglishplain2003-10-03 07:17:15
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".
jenglish Closed ticket [729200ffff]. [History diff]2003-10-03 07:20:12
Log in (anonymous is fine) to add a comment.