Re: Port of GCC to Intel IA-64 architecture (Merced)

fjh@cs.mu.OZ.AU (Fergus Henderson)
10 Jul 1998 21:02:14 -0400

          From comp.compilers

Related articles
Port of GCC to Intel IA-64 architecture (Merced) jpripp@ecsu.campus.mci.net (Jason Tripp) (1998-06-27)
Re: Port of GCC to Intel IA-64 architecture (Merced) Alexandru.Petrescu@crpht.lu (Alexandru Petrescu) (1998-06-28)
Re: Port of GCC to Intel IA-64 architecture (Merced) fjh@cs.mu.OZ.AU (1998-06-28)
Re: Port of GCC to Intel IA-64 architecture (Merced) sef@kithrup.com (Sean Eric Fagan) (1998-07-01)
Re: Port of GCC to Intel IA-64 architecture (Merced) burley@cygnus.com (Craig Burley) (1998-07-01)
Re: Port of GCC to Intel IA-64 architecture (Merced) meissner@cygnus.com (Michael Meissner) (1998-07-01)
Re: Port of GCC to Intel IA-64 architecture (Merced) tim@wagner.princeton.edu (1998-07-08)
Re: Port of GCC to Intel IA-64 architecture (Merced) fjh@cs.mu.OZ.AU (1998-07-10)
| List of all articles for this month |

From: fjh@cs.mu.OZ.AU (Fergus Henderson)
Newsgroups: comp.compilers
Date: 10 Jul 1998 21:02:14 -0400
Organization: Computer Science, The University of Melbourne
References: 98-06-153 98-06-158 98-06-166 98-07-014 98-07-061
Keywords: GCC, architecture

tim@wagner.princeton.edu writes:


>Craig Burley <burley@cygnus.com> writes:
>> What is still a problem, AFAIK, is that, internally, gcc makes some
>> assumptions about the equivalency of sizes of integers between the
>> host and target machines.
>
>What is even worse, IMO, is that gcc will not warn about casting a pointer
>to an integer *unless* you are on a machine where the sizes are different.


This is a completely different issue, and gcc's behaviour is quite
justifiable. Casting between a pointer and an integer is quite
portable so long as the sizes are the same, and provided your source
code uses conditional compilation (and/or autoconf, etc.), then it is
not unreasonable to do such casts; for certain kinds of applications,
this is often quite useful. gcc's philosophy of warnings is that in
general it does not warn about constructs that "we consider reasonable
to use, on occasion, in clean programs." even if you specify `-Wall'.


>When I was maintaining a program that was (painfully) being moved
>alphas back when they were new, this was very annoying, since I had to
>rely on other people's compile logs instead of just using something
>like -Wpointer-integer.


Of course a `-Wpointer-integer' option might be useful in some
circumstances. The nice thing about gcc is that it comes with source
code, so you can add these things yourself if your need is great
enough... I imagine that adding that one would be pretty simple.


--
Fergus Henderson <fjh@cs.mu.oz.au>
WWW: <http://www.cs.mu.oz.au/~fjh>
PGP: finger fjh@128.250.37.3
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.