home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!crdgw1!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bingsuns.cc.binghamton.edu!umrigar
- From: umrigar@bingsuns.cc.binghamton.edu (Zerksis D. Umrigar)
- Newsgroups: gnu.g++.bug
- Subject: g++ bug
- Message-ID: <9212272039.AA23575@bingsuns.cc.binghamton.edu_>
- Date: 27 Dec 92 20:39:50 GMT
- Sender: gnulists@ai.mit.edu
- Distribution: gnu
- Organization: GNUs Not Usenet
- Lines: 34
- Approved: bug-g++@prep.ai.mit.edu
-
- /*
-
- The following fails to compile under a unmodified gcc 2.3.2
- (mips-dec-ultrix4.2). It compiles if the marked (enum) line below is
- commented out, or the enum initializer is changed to a sizeof(void *). The
- compilation log is shown after the program.
-
- */
-
- class X {
- struct X1;
- enum { A= sizeof(X1 *) }; //Causes a problem.
- struct X1 { int i; };
- X1 *f(X1 *);
- public:
- X(void);
- };
-
- X::X1 *X::f(X1 *x) {
- return x;
- }
-
- /* COMPILATION LOG
- gcc -c t2.cc
- t2.cc:19: argument list for `f' does not match any in class
- t2.cc: In method `struct X::X1* X::f (struct X::X1*)':
- t2.cc:20: type `X1' is not a base type for type `X1'
- t2.cc:21: warning: control reaches end of non-void function
-
- Compilation exited abnormally with code 1 at Sun Dec 27 11:59:14
-
- -zerksis umrigar (umrigar@bingsuns.cc.binghamton.edu).
-
- */
-