c/762: can not calculate x *=x++ correctly on GNU 2.8.1 in sparc-sun-solaris2.6 environment

chuchunxin@hotmail.com chuchunxin@hotmail.com
Thu Nov 9 15:16:00 GMT 2000


>Number:         762
>Category:       c
>Synopsis:       can not calculate x *=x++ correctly on GNU 2.8.1 in sparc-sun-solaris2.6 environment
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 09 15:16:01 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     chun-xin chu
>Release:        2.8.1
>Organization:
>Environment:
sun solaris 2.6
>Description:
x = 2;
x *= x++;

what is the value of x? 

It should be 5, but in the workstation I can only get 3.
>How-To-Repeat:
Just do a calculation on the above expression
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-bugs mailing list