This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/5494: ((++a)+(++a)) yeilds 4 on x86, but 3 on everything else.



>Number:         5494
>Category:       c++
>Synopsis:       ((++a)+(++a)) yeilds 4 on x86, but 3 on everything else.
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jan 25 11:36:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Guild of the Void Pointer
>Release:        gcc 2.95.2
>Organization:
>Environment:
MAC OS X and Debian Linux.
>Description:
this code..

void main(void){
 int a=0;

 cout << ((++a)+(++a)) << endl; 
}

will produce 4 on x86, but 3 on every other arch I can test.
>How-To-Repeat:

>Fix:

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]