From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27641 invoked by alias); 27 Feb 2003 18:22:41 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 27616 invoked by uid 48); 27 Feb 2003 18:22:41 -0000 Date: Thu, 27 Feb 2003 18:22:00 -0000 Message-ID: <20030227182241.27615.qmail@sources.redhat.com> To: asharji@uwaterloo.ca, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, pabuhr@uwaterloo.ca From: bangerth@dealii.org Reply-To: bangerth@dealii.org, asharji@uwaterloo.ca, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, pabuhr@uwaterloo.ca, gcc-gnats@gcc.gnu.org Subject: Re: c++/9881: Incorrect address calculation for static class member X-SW-Source: 2003-02/txt/msg01432.txt.bz2 List-Id: Synopsis: Incorrect address calculation for static class member State-Changed-From-To: open->closed State-Changed-By: bangerth State-Changed-When: Thu Feb 27 18:22:41 2003 State-Changed-Why: In this code, foo f; // print output double *module::b = &(((bar *)&module::storage)->p); double module::storage = 0.0; The constructor of foo is run before module::b is initialized. If you change this order, the output is as you expect. W. http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9881