This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: binutils-2.15 - work around for gcc optimization problem on sparc -sun-solaris2.7
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: Kelvin Lee <Kelvin dot Lee at lansa dot com dot au>,"'bug-binutils at gnu dot org'" <bug-binutils at gnu dot org>,"'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Date: Wed, 14 Jul 2004 11:58:55 +0200
- Subject: Re: binutils-2.15 - work around for gcc optimization problem on sparc -sun-solaris2.7
- References: <817522051E65D511A2740001028074C4C2F507@EX1> <200407140856.08437.ebotcazou@libertysurf.fr> <40F4F636.2030202@redhat.com>
> Hi Eric,
Hi Nick,
> Maybe... It involves arithmetic comparisons of pointers to separately
> allocated objects, which is a bit dubious in the first place.
Note that it doesn't compare pointers directly, but first performs a
substraction on pointers which is strictly specified by C99 6.5.6 §9: "When
two pointers are substracted, both shall point to elements of the same array
object, or one past the last element of the array object; the result is the
difference of the subscripts of the two array elements."
So my understanding is that there isn't any GCC bug here.
> Doh! Yes - I missed this. Very sorry. I will revert Kelvin's patch.
Thanks!
--
Eric Botcazou