This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9881: Incorrect address calculation for static class member
- From: bangerth at dealii dot org
- To: asharji at uwaterloo dot ca, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, pabuhr at uwaterloo dot ca
- Date: 27 Feb 2003 18:22:41 -0000
- Subject: Re: c++/9881: Incorrect address calculation for static class member
- Reply-to: bangerth at dealii dot org, asharji at uwaterloo dot ca, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, pabuhr at uwaterloo dot ca, gcc-gnats at gcc dot gnu dot org
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