This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: [Fwd: [Fwd: gdb 20000413 compile problem and strange SEGVproblem]]
- To: Tim Mooney <mooney at dogbert dot cc dot ndsu dot nodak dot edu>
- Subject: Re: [Fwd: [Fwd: gdb 20000413 compile problem and strange SEGVproblem]]
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 27 Apr 2000 17:30:27 +1000
- CC: GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Organization: Cygnus Solutions
- References: <Pine.OSF.4.21.0004270100300.31704-100000@dogbert.cc.ndsu.nodak.edu>
Tim Mooney wrote:
> >> They were errors, not warnings. The build stopped at that point. This was
> >> with the latest version of the vendor compiler on alpha-dec-osf4.0f (4.0f ==
> >> Rev 1229, you can tell what the letter version is by running `sizer -v').
> >> I don't know if I tried this on my 5.0 box at home, but I don't think so.
> >> I think rev 464 is osf4.0b, which has a compiler that may not be as recent
> >> as the current patched compiler on the later versions of the OS.
> >
> >Is there a way of convincing the compiler that it shouldn't be so pig
> >headed?
>
> I don't think so. I just checked with both ANSI (-std1) and ANSI+extensions
> (-std) and in both cases the 4.0f compiler still objects to the comparisons.
>
> I've been known to be wrong, but my feeling is that the compiler is actually
> correct. Based on my reading of K&R 2e (section 5.4, page 103, last paragraph
> which begins "The valid pointer operations are..."), casting `tcomplain' to
> `void *' is not enough to allow pointer comparison.
Yes, the compiler is right. Just pig-headed :-)
> "target.c", line 3066: warning: operands have incompatible pointer types: op "=="
> "target.c", line 3068: warning: operands have incompatible pointer types: op "=="
The warnings I'm not immediatly worried about. They'll get fixed as
people get more picky about -Wall and the like.
> Is there a reason why changing the cast as I mentioned in my original
> message is unacceptable?
No. I'm just trying to figure out how much damage there is going to be.
> >> If you want to email me how I can get access to the 5.0 tree, I'll happily
> >> test the build on a few different versions of the OS, including my 5.x box
> >> at home. If I just do a `cvs checkout' will I get the 5.0 tree, or do I have
> >> to do something special?
> >
> >You would need to specify ``-r gdb_5_0-2000-04-10-branch''.
>
> Thanks, I got all 67 Meg of gdb+dejagnu :-), but decided to try the
> gdb-4.95.0 snapshot instead, and the problem still exists in that snapshot.
> Trying to build that on 4.0f fails in target.c.
Could you force the compilation to continue and see if there are any
other errors.
Andrew