From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4230 invoked by alias); 31 Jul 2003 17:52:03 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 4223 invoked by uid 48); 31 Jul 2003 17:52:02 -0000 Date: Thu, 31 Jul 2003 17:52:00 -0000 From: "me at elitsa dot net" To: gcc-bugs@gcc.gnu.org Message-ID: <20030731175202.11751.me@elitsa.net> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c/11751] New: wrong evaluation of an expression X-Bugzilla-Reason: CC X-SW-Source: 2003-07/txt/msg03696.txt.bz2 List-Id: PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11751 Summary: wrong evaluation of an expression Product: gcc Version: 3.2 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: me at elitsa dot net CC: gcc-bugs at gcc dot gnu dot org bellow is simple code that express this bug: /************ * File : b.C ************/ #include int main() { int a = 1; printf(" a = %i \n",(a++)+(++a)); //4 a = 1; printf(" a = %i \n",(a++)+(a++)+(++a)); //4 return 0; } After compilation in a following way: c++ -o b b.C The result was: a = 4 a = 4