------- Comment #7 from joseph at codesourcery dot com 2006-03-22 12:26 ------- Subject: Re: -Wsequence-point reports false positives
On Wed, 22 Mar 2006, rguenth at gcc dot gnu dot org wrote: > i = ++i; Modified twice between sequence points, so undefined behavior. > I think the point is we should not warn for pre-increment, only > post-increment. > Or can someone come up with a testcase that has undefined evaluation order > just > by using pre-increment? One with two pre-increments: It's undefined behavior, not undefined evaluation order. Pre-increment returns the new value, but that doesn't mean the new value is stored until the following sequence point. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18050