A place for Ogre users to discuss non-Ogre subjects with friends from the community.
-
AlexeyKnyshev
- Goblin
- Posts: 213
- Joined: Sat May 26, 2012 10:37 am
- Location: Russia
- x 13
Post
by AlexeyKnyshev »
Is it undefined behavior?
Code: Select all
int i = 1;
i = i++ + ++i;
printf("%d", i);
p.s. I'm sure about UB in " i = ++i + ++i; "
-
saejox
- Goblin
- Posts: 260
- Joined: Tue Oct 25, 2011 1:07 am
- x 36
Post
by saejox »
Even 'i = i++' is undefined.
There is a nice wiki article about it:
http://en.wikipedia.org/wiki/Sequence_point
Nimet - Advanced Ogre3D Mesh/dotScene Viewer
asPEEK - Remote Angelscript debugger with html interface
ogreHTML - HTML5 user interfaces in Ogre