Re: problems with compiler differences between version 3.3.5 and 4.0.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 02, 2006 at 08:46:13AM -0800, Brian Budge wrote:
> 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@xxxxxx> 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
> >

I think here the problem is that the above description is not
accurate; Brian's guess would work if A is a qualified dependent name in B
(and then the above description would be misleading ---
there is a big difference between A and X::A).

Oliver


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux