|
| From: | Dave Hansen |
| Subject: | Re: [avr-gcc-list] OT Generic C question |
| Date: | Thu, 22 Sep 2005 15:17:05 -0400 |
From: Alan Kilian <address@hidden> [...]
Here's an excerpt from:
http://publications.gbdirect.co.uk/c_book/chapter8/sequence_points.html
"This is why you cannot rely on expressions such as:
a[i] = i++;
because there is no sequence point specified for the
assignment, increment or index operators, you don't know when
the effect of the increment on i occurs. "
Actually, it's worse than that. It's undefined behavior. The variable i may not be incremented at all. Or your CD drawer may open. See http://www.eskimo.com/~scs/C-faq/q3.9.html
Regards, -=Dave
| [Prev in Thread] | Current Thread | [Next in Thread] |