From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10434 invoked by alias); 22 Mar 2006 12:53:33 -0000 Received: (qmail 10418 invoked by uid 48); 22 Mar 2006 12:53:30 -0000 Date: Wed, 22 Mar 2006 12:53:00 -0000 Message-ID: <20060322125330.10417.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/18050] -Wsequence-point reports false positives In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" 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 X-SW-Source: 2006-03/txt/msg02203.txt.bz2 List-Id: ------- Comment #8 from rguenth at gcc dot gnu dot org 2006-03-22 12:53 ------- Sure - but this doesn't matter in this case. And 6.5.3.1 tells you "The expression ++E is equivalent to (E+=1)." 6.5.16 says "The side effect of updating the stored value of the left operand shall occur between the previous and the next sequence point." For i = ++i; this means we have i = (i += 1); where for i += 1 the next sequence point is the i = ... assigment? Of course for the particular testcase the ordering of the two stores does not matter. Would int i=0; i = ++i + 1; be able to result in i == 1? I don't think so as per 6.5.16. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18050