This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7538: Constructors of static members are not called always
- From: Christian Neubauer <neu at iis dot fhg dot de>
- To: nathan at gcc dot gnu dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, neu at iis dot fhg dot de, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
- Date: Mon, 16 Sep 2002 10:38:27 +0200
- Subject: Re: c++/7538: Constructors of static members are not called always
- Organization: FhG-IIS-A
- References: <20020913231526.29289.qmail@sources.redhat.com>
Dear Nathan,
no the issue is not solved in 3.0.4. I tried (before the submission) and
again today. If you look in the second example the line saying
"staticClass::staticClass() called" is not printed. This means that the
static member class is not instanciated, what (in my opinion) is a bug.
Please consider the problem again.
Regards
Christian Neubauer
1. link program using gcc and start
+ g++ main.o classA.o staticClass.o -o main
+ ./main
staticClass:::staticClass() called
main() called
This should result in five: 5
main() finished
+ set +x
2. link program using a library and start
+ ar cru libtest.a classA.o staticClass.o
+ g++ main.o -L. -ltest -o main
+ ./main
main() called
This should result in five: 5
main() finished
+ set +x
nathan@gcc.gnu.org wrote:
Synopsis: Constructors of static members are not called always
State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Fri Sep 13 16:15:25 2002
State-Changed-Why:
works in 3.2
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7538
--
Dr. Christian Neubauer Phone: +49 9131 776-355
FhG-IIS A, Audio & Multimedia Mobil: +49 160 5840467
Am Wolfsmantel 33, D-91058 Erlangen, Germany Fax: +49 9131 776-398