This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: what's the meaning of the warning "instantiated from here"
- From: John Love-Jensen <eljay at adobe dot com>
- To: hj <hj at cad dot zju dot edu dot cn>
- Cc: MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Wed, 07 Jun 2006 11:15:16 -0500
- Subject: Re: what's the meaning of the warning "instantiated from here"
Hi hj,
> En, I followed the message, and find the warning description as: "xxxx
> will be initialized after".
> But I still cannot understand what the compiler want to tell me.
class Foo
{
public:
Foo();
int x;
int y;
int z;
};
Foo::Foo()
:
z(3),
y(2),
x(1)
{
}
Even though you specified the initialization list z, y then x, they will be
initialized x, y then z (as specified in the declaration order).
That's what the "xxxx will be initialized after" warning is telling you.
--Eljay