From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32601 invoked by alias); 31 Oct 2006 00:01:29 -0000 Received: (qmail 32499 invoked by uid 48); 31 Oct 2006 00:01:16 -0000 Date: Tue, 31 Oct 2006 00:01:00 -0000 Message-ID: <20061031000116.32498.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/29582] Parameter pushed to stack too soon In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "bangerth at dealii 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-10/txt/msg02631.txt.bz2 List-Id: ------- Comment #5 from bangerth at dealii dot org 2006-10-31 00:01 ------- (In reply to comment #0) > COtherClass(5, m_szSzField, NULL, 0, > "ImmString1").Method1().Method2(m_ullProblemField)("ImmString2", > m_pvPointerField)("ImmString3", m_ullProblemField); > [...] > The problem is that the value of m_ullProblemField is pushed to stack at the > very beginning of code while it is modified later during invocation of > COtherClass::Method2. COtherClass::operator (const char *, unsigned long long) > should receive modified value of field but it receives initial one. No. The order of evaluation of your sequence of function calls is unspecified. There is no sequence point within your chain of calls, and therefore the compiler is free to select whatever order for evaluating the arguments of all these calls. W. -- bangerth at dealii dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bangerth at dealii dot org Status|UNCONFIRMED |RESOLVED Resolution| |INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29582