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]

Re: Tree generation bug or a feature?


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

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