This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: problems with compiler differences between version 3.3.5 and 4.0.2
- From: Brian Budge <brian dot budge at gmail dot com>
- To: Christian Weckmueller <cris dot tian at web dot de>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Thu, 2 Feb 2006 08:46:13 -0800
- Subject: Re: problems with compiler differences between version 3.3.5 and 4.0.2
- References: <200602021556.31645.cris.tian@web.de>
It seems like in this case, this should work... Usually this error is
found in conjunction with templates, at least in my experience.
I don't know the actual reason why g++ stopped being able to recognize
these kinds of types (I bet it has something to do with the
standard... anyone?), but the fix is usually easy...
try
typename A a;
Brian
On 2/2/06, Christian Weckmueller <cris.tian@web.de> wrote:
> Hello dear gcc-helper,
>
> I have a program without problems compiling with 3.3.5 but don't work with
> 4.0.2.
>
> there is on class A and another on B
> so B has a datamember an object of A, like this
>
> class A{
> ...
> };
>
> class B{
> ...
> A a; <<<<<<<
>
> };
>
> The compiler answers that:
>
> file linenumber: A does not name a type
>