[Bug c++/48814] Incorrect scalar increment result

2011-04-29 Thread schaub.johannes at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48814 --- Comment #5 from Johannes Schaub 2011-04-29 16:20:44 UTC --- (In reply to comment #4) > I think the relevant wording in the C1X DIS is "With respect to an > indeterminately-sequenced function call, the operation of postfix ++ is a > single e

[Bug c++/48814] Incorrect scalar increment result

2011-04-29 Thread joseph at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48814 --- Comment #4 from joseph at codesourcery dot com 2011-04-29 12:13:46 UTC --- I think the relevant wording in the C1X DIS is "With respect to an indeterminately-sequenced function call, the operation of postfix ++ is a single evaluation."; C++

[Bug c++/48814] Incorrect scalar increment result

2011-04-29 Thread joseph at codesourcery dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48814 --- Comment #3 from joseph at codesourcery dot com 2011-04-29 12:03:14 UTC --- This may well be a bug, but it's the sort of case where you want an analysis not in terms of sequence points but in terms of the more precisely defined sequencing mod

[Bug c++/48814] Incorrect scalar increment result

2011-04-29 Thread schaub.johannes at googlemail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48814 --- Comment #2 from Johannes Schaub 2011-04-29 10:42:12 UTC --- Since the order of evaluation is undefined it may evaluate "count++" and "incr()" in any order, as it pleases. Since there is a sequence point before entering a function, and befor

[Bug c++/48814] Incorrect scalar increment result

2011-04-29 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48814 --- Comment #1 from Richard Guenther 2011-04-29 09:56:08 UTC --- 6.5.16/4 "The order of evaluation of the operands is unspecified." The gimplifier is responsible for this semantic detail of GENERIC (that matches C for its sequence point rules)