This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Incomplete Types



Your testcase compiles without complaint on UnixWare 7.1.0 CC and on
the development snapshot of EGCS as of this morning.

So, without actually understanding the code, I'm guessing you just ran
into a C++ feature that hadn't been implemented in EGCS 1.1.2.


Leslie Kuczynski wrote:
> I posted a question with incomplete information before. I
> have tried to clarify my problem here.
> 
> Could someone explain the following behavior:
> 
> the C++ compiler I am using on Unixware 2.1 is:
> UX:CC: INFO: C++ Compilation System 2.0 12/10/95 (eiger8)
> 
> the C++ compiler I am using on Linux (RedHat 5.2) is:
> gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
> 
> A test case is:
> 
> file: test.C
> 
> template <class T, unsigned long T::*Key> class aa
> {
> public:
>         aa(void) {};
> };
> 
> class bb {
> public:
>         unsigned long cc;
>         static aa<bb, &bb::cc> aa_inst;
> };
> 
> void main(void)
> {
> 
> }
> 
> Results:
> 
> Unixware:
> > CC -o test test.C
> >
> 
> Linux:
> > egcs -o test test.C
> test.C:10: incomplete type `bb' does not have member `cc'
> test.C:10: template argument 2 is invalid
> test.C:10: warning: ANSI C++ forbids declaration `aa_inst' with no type
> 
> Thank you,
> Leslie Kuczynski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]