This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: a.out gives different results when compiled by g++ 3.1 and g++ 3.1 -O
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: Erick Alphonse <alphonse at lri dot fr>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2002 19:16:34 +0200
- Subject: Re: a.out gives different results when compiled by g++ 3.1 and g++ 3.1 -O
- References: <87bsac6y2s.fsf@student.uni-tuebingen.de><3D0CD5B2.2030805@lri.fr>
Erick Alphonse <alphonse@lri.fr> writes:
> >>*p++ = twist( p[M-N], p[0], p[1] );
>
> I have found the latest version of the code, and the guy goes:
> v0.7 - Fixed operator precedence ambiguity in reload()
>
> which gives:
> for( i = N - M; i--; ++p )
> *p = twist( p[M], p[0], p[1] );
> for( i = M; --i; ++p )
> *p = twist( p[M-N], p[0], p[1] );
>
> I suppose it's what your were talking about.
No, while it looked fishy, it was actually well-defined, since the
function call introduces a sequence point.
--
Falk