Re: Tcl 8.5 HP/UX Compiler warnings
From: R. T. Wurth (rwurth_at_att.net)
Date: 01/13/04
- Next message: Gareth Bradley: "Bring window to front?"
- Previous message: tim: "Re: Binary to Integer"
- In reply to: Cameron Laird: "Re: Tcl 8.5 HP/UX Compiler warnings"
- Next in thread: Donal K. Fellows: "Re: Tcl 8.5 HP/UX Compiler warnings"
- Reply: Donal K. Fellows: "Re: Tcl 8.5 HP/UX Compiler warnings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 13 Jan 2004 02:59:44 GMT
(Sorry if the earlier post leaked out. My newsreader scrambled the
post, deleting lots of what I'd written and adding in old junk.
I canceled it. Here's what I meant to say.)
In article <1005fi5et9blga1@corp.supernews.com>, claird@phaseit.net
wrote:
> In article <btjm92$g6k$2@srv38.cas.org>, <lvirden@yahoo.com> wrote:
> .
> >I'd normally say "no", but there are several platforms whose
compilers
> >are ... 'unique' in their behavior and error reporting. What
> >specific compiler and version are you using on HP/UX ?
> .
> As bad as the reputation of HP's compilers is, I
> believe Tcl is up to a clean generation with all
> of them. I think I can help fix up any real pro-
> blems found.
>
> Larry's right, of course: specific details'll
> move this along much faster.
I thought I had provided as much as possible by quoting uname
results and "the optional HP ANSI C compiler", esp. since it doesn't
support anything like a --version option. Then I tried something
different, using what(1):
rwurthHPAnsiCView:urkel@ uname -a
HP-UX urkel B.11.00 U 9000/800 1552710528 unlimited-user license
rwurthHPAnsiCView:urkel@ ls -l /usr/bin/cc
lr-xr-xr-t 1 root sys 17 Mar 5 2003 /usr/bin/cc ->
/opt/ansic/bin/cc
rwurthHPAnsiCView:urkel@ ls -l /opt/ansic/bin/cc
-r-xr-xr-x 2 bin bin 606208 Jun 13 2002
/opt/ansic/bin/cc
rwurthHPAnsiCView:urkel@ what /opt/ansic/bin/cc
/opt/ansic/bin/cc:
LINT B.11.11.06 CXREF B.11.11.06
HP92453-01 B.11.11.06 HP C Compiler
$ Sep 8 2000 23:13:51 $
Also, I traced two of the classes of error messages far enough to
open bug reports 874058 and 873919.
Far more details are in the bug reports, but the executive summaries
are:
1.) After all the substitutions, stat64 struct pointers are being
supplied to the stat and lstat system calls that should take regular
stat struct pointers. The elementary types of the structure
elements match, but there is one instance where the declared types
differ (but they both eventually resolve through typedefs to the
same elementary type), and there's another place where both declared
type and name differ, but the eventual base type (after resolving
all the typedefs) is the same.
2.) Tcl, trying to be portable makes a TclFd (storage for a file
pointer/descriptor) the biggest thing it could think of, a pointer.
The UNIX implementation of File I/O knows that it's native file
descriptor is only an int. The macros that cast back and forth
cause a warning when the 64-bit pointer is converted to a 32-bit int
and arithmetic is performed. In reality, since UNIX fd's are
limited in range to very small integers, there is no real problem
beyond this compiler warning that scares the living daylights out of
naive users like me.
I think I've come up with similarly reasonable arguments that the
other warnings I cited are similarly harmless. Still, I'd think the
fewer compiler warnings, the better off, so that new bugs don't get
hidden amidst all the clutter of warnings.
-- Rich Wurth / rwurth@att.net / Rumson, NJ 07760 USA Consultant to the telecom industry
- Next message: Gareth Bradley: "Bring window to front?"
- Previous message: tim: "Re: Binary to Integer"
- In reply to: Cameron Laird: "Re: Tcl 8.5 HP/UX Compiler warnings"
- Next in thread: Donal K. Fellows: "Re: Tcl 8.5 HP/UX Compiler warnings"
- Reply: Donal K. Fellows: "Re: Tcl 8.5 HP/UX Compiler warnings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|