This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Incomplete Types
- To: Leslie Kuczynski <lkuczyns at emc dot com>
- Subject: Re: Incomplete Types
- From: Robert Lipe <robertlipe at usa dot net>
- Date: Thu, 1 Apr 1999 09:57:21 -0600
- Cc: egcs at egcs dot cygnus dot com, lesliek at emc dot com
- References: <199904011425.JAA02153@lns0108.lss.emc.com>
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