Overview
| Artifact ID: | 2bcbb049b691afe4701f52267256552aa5ea9f53 |
|---|---|
| Ticket: | 873897ffffffffffffffffffffffffffffffffff
tclUnixPipe.c HP cc pointer truncate warnings |
| User & Date: | rwurth on 2004-01-09 17:01:43 |
Changes
- assignee changed to: "vincentdarley"
- cmimetype changed to: "text/plain"
- comment changed to:
The source file unix/tclUnixPipe.c, when compiled with HP's ANSI C compiler with --enable-64bit produces many instances of the error: Cast truncates pointer into 32 bit integer. These occur on lines 115, 328, 434, 487, 649, 734, 736, 738, 836, 848, 956, 1016, 1064, 1105, 1109, 1115, 1119, 1151, 1155, and 1186. (In case the code changes change the line numbers, line 115 is the line: return MakeFile((int)data); in proc TclpMakeFile. All the other instances involve the GetFd macro, and every such instance of GetFd causes the warning except for 2 that are #ifdef'ed out of the compilation.) The root cause of the warings appears to be that TclFile is declared (via a typedef) to be a pointer (specifically of type (struct TclFile_ *)), but the code treats it as an int, the macros GetFd and MakeFile cast it to an int, and eventually the int result is used as an integer file descriptor to the read and write UNIX system calls. OS: (uname -a): HP-UX urkel B.11.00 U 9000/800 1552710528 unlimited-user license Config flags: MAKE=gmake CC=/usr/bin/cc ./configure \ --enable-shared \ --enable-64bit \ --prefix=/usr/local/tcl-X/tcl8.5 \ --exec-prefix=/usr/local/tcl-X/tcl8.5 Compile line: /usr/bin/cc -c -O -DTCL_DBGX= +z -I./../generic -I. +DA2.0W -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_TYPE=long\ long -DHAVE_STRUCT_STAT64=1 -DHAVE_TYPE_OFF64_T=1 -DWORDS_BIGENDIAN=1 -DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1 -DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_MODEM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_ST_BLKSIZE=1 -DNO_UNION_WAIT=1 -DNO_GETTOD=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -D_XOPEN_SOURCE=1 -D_XOPEN_SOURCE_EXTENDED=1 -DTCL_CFG_DO64BIT=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_CFG_DEBUG=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_SHLIB_EXT=\".sl\" ./../unix/tclUnixPipe.c - foundin changed to: "None"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "rwurth"
- subsystem changed to: "37. File System"
- title changed to:
HEAD (8.5 pre) tclUnixPipe.c HP cc pointer truncate warnings
- type changed to: "Bug"