This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Tree generation bug or a feature?
- To: Yuri Pudgorodsky <yur at asplinux dot ru>
- Subject: Re: Tree generation bug or a feature?
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Wed, 24 May 2000 14:05:22 +0100
- CC: gcc at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <392BCFAF.FC593DC7@asplinux.ru>
Yuri Pudgorodsky wrote:
> With the following two statements, I supposed to get identical result:
>
> x = 2; y = ++x * ++x;
> x = 2; y = (x+=1) * (x+=1);
>
> Sounds like a tree generation bug, isn't it?
No. you've invoked undefined effects see
http://www.eskimo.com/~scs/C-faq/s3.html
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org