From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28905 invoked by alias); 23 Nov 2013 16:59:14 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 28891 invoked by uid 48); 23 Nov 2013 16:59:10 -0000 From: "smaheshs41 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/59264] New: Incorrect order of execution on increament/decrement operator Date: Sat, 23 Nov 2013 16:59:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: smaheshs41 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg02420.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59264 Bug ID: 59264 Summary: Incorrect order of execution on increament/decrement operator Product: gcc Version: 4.8.3 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: smaheshs41 at gmail dot com Created attachment 31281 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31281&action=edit The Order of execution of the code is not working properly in the 2nd & 3rd condition the expected output is 13 but 11 but it works correctly in 1st condition and the result is 13 As in the program stated it works fine when we have two increament/deacrement operator and one arithmetic operator(+). But, when we try the same thing with three increament/deacrement operator and two arithmetic operator(+) out off three conditions only for one condition the code gets executed correctly for the remaining two conditions it gives incorrect output.