This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pointer <-> integer conversion warnings (bogus -Wall warnings)


On Wed, Mar 13, 2002 at 06:53:08PM -0800, Tom Lord wrote:
>    > The simple rule that explicit casts to appropriate types don't
>    > generate warnings in the absense of extraordinary options gives this
>    > class of warnings a clear and useful relation to the various
>    > standards.  I don't understand why that rule is at all controversial.
> 
>    Because virtually all code that pointer to integer casts with "int" 
>    breaks on 64-bit targets.  This is not speculation; this is hard
>    experience bringing alpha-linux up from the first shell prompt.
... 
> To match your tone I guess I'd have to make fun of you for confusing
> "virtually all code" with "alpha-linux" and express my shock that a C
> compiler maintainer would have such a sloppy attitude.

You are being unreasonable -- or maybe just not experienced enough.

Try using the same OS code base for ILP32 LE (i386), LP64 LE (Alpha), and
LP64 BE (sparc64) and you WILL appreciate all the warnings GCC gives in
this area.  We do this in FreeBSD'ville, and the number of times the i386
guys break things on Alpha (and soon sparc64) has lead us to turn on
-Werror to harder beat them over head head with this type of warning.

-- 
-- David  (obrien@FreeBSD.org)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]