[Bug c/11751] wrong evaluation order of an expression

2005-02-23 Thread d_picco at hotmail dot com
--- Additional Comments From d_picco at hotmail dot com 2005-02-23 23:27 --- I won't press the issue further because I have other things more pressing ;) But I think the decision to not change the behaviour here is wrong. I cannot create an Integer class that acts as an int due t

[Bug c/11751] wrong evaluation order of an expression

2005-02-23 Thread d_picco at hotmail dot com
--- Additional Comments From d_picco at hotmail dot com 2005-02-23 20:46 --- Here is a better clarification: Case 1 == int a = 0; int b = a++ + a++; printf("b = %d\n", b); // output is 0 Case 2 == class A { int a_; public: A() : a_(0) {} int operator++() {

[Bug c/11751] wrong evaluation order of an expression

2005-02-23 Thread d_picco at hotmail dot com
--- Additional Comments From d_picco at hotmail dot com 2005-02-23 20:38 --- The point I was making with my example is that the native types (int, long, char, etc...) have different behaviour than a user-defined class with the operator++. If it is compiler dependent which way the

[Bug c/20181] Increment/decrement

2005-02-23 Thread d_picco at hotmail dot com
--- Additional Comments From d_picco at hotmail dot com 2005-02-23 20:24 --- (In reply to comment #0) > Consider these situations: > > int a = 0; > int b = a++ + a++; > int c = (a++) + (a++); > int d = a++ + (a++); > int e = (a++) + a++; > > b == c == d ==

[Bug c/20181] New: Increment/decrement

2005-02-23 Thread d_picco at hotmail dot com
Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: d_picco at hotmail dot com CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20181