This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
gcc Compiler bug
- To: gcc-bugs at gcc dot gnu dot org
- Subject: gcc Compiler bug
- From: Wim Brouw <Wim dot Brouw at atnf dot csiro dot au>
- Date: Wed, 24 Nov 1999 15:13:07 +1100
- CC: wbrouw at atnf dot csiro dot au
- Organization: ATNF
The bug can be represented by the following very simple code, which is left over after
deleting all lines that did not give the compiler error. Deleting the line marked '// xx'
will let compilation proceed.
Program a.cc:
#if !defined(AIPS_MDIRECTION_H)
#define AIPS_MDIRECTION_H
class Measure {
};
template<class M> class MB : public Measure {
public:
MeasBase(const typename M::MVType &dt, const typename M::Ref &rf); // xx
};
class MDirection;
class MDirection : public MB<MDirection> {
public:
};
#endif
Command line:
/usr/local/egcs/bin/g++ -v --save-temps -DAIPS_SOLARIS -DNATIVE_EXCP -DAIPS_DEBUG -DAIPS_ARRAY_INDEX_CHECK -I/nfs/data_norma/aips++/code/include -I/nfs/data_norma/aips++/sun4sol_egcs -I/nfs/aips++/weekly/code/include -I/nfs/aips++/weekly/code/aips/glish/include -I/usr/openwin/include -c -g -fPIC -fno-implicit-templates -Wall -pipe -o a.o a.cc ;
g++: Warning: -pipe ignored since -save-temps specified
Reading specs from /usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
/usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.60/cpp -lang-c++ -v -I/nfs/data_norma/aips++/code/include -I/nfs/data_norma/aips++/sun4sol_egcs -I/nfs/aips++/weekly/code/include -I/nfs/aips++/weekly/code/aips/glish/include -I/usr/openwin/include -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=91 -Dsparc -Dsun -Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__ -D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4) -D__EXCEPTIONS -g -Wall -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) -DAIPS_SOLARIS -DNATIVE_EXCP -DAIPS_DEBUG -DAIPS_ARRAY_INDEX_CHECK a.cc a.ii
GNU CPP version egcs-2.91.60 19981201 (egcs-1.1.1 release) (sparc)
#include "..." search starts here:
#include <...> search starts here:
/nfs/data_norma/aips++/code/include
/nfs/data_norma/aips++/sun4sol_egcs
/nfs/aips++/weekly/code/include
/nfs/aips++/weekly/code/aips/glish/include
/usr/openwin/include
/usr/local/egcs/include/g++
/usr/local/include
/usr/local/egcs/sparc-sun-solaris2.5.1/include
/usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.60/include
/usr/include
End of search list.
/usr/local/egcs/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.60/cc1plus a.ii -quiet -dumpbase a.cc -g -Wall -version -fPIC -fno-implicit-templates -o a.s
GNU C++ version egcs-2.91.60 19981201 (egcs-1.1.1 release) (sparc-sun-solaris2.5.1) compiled by GNU C version egcs-2.91.60 19981201 (egcs-1.1.1 release).
a.cc:11: warning: return-type of `MeasBase' defaults to `int'
a.cc: In instantiation of `MB<MDirection>':
a.cc:15: instantiated from here
a.cc:15: Internal compiler error.
a.cc:15: Please submit a full bug report to `egcs-bugs@cygnus.com'.
a.cc:15: See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.
a.ii:
# 1 "a.cc"
class Measure {
};
template<class M> class MB : public Measure {
public:
MeasBase(const typename M::MVType &dt, const typename M::Ref &rf);
};
class MDirection;
class MDirection : public MB<MDirection> {
public:
};
--
------------------------------------------------------------------------------
Dr W N Brouw (Wim) | phone: (+61)2.93724316 (work)
Australia Telescope National Facility | (+61)2.98683565 (home)
CSIRO | fax: (+61)2.93724310
P.O. Box 76 | email: Wim.Brouw@atnf.csiro.au
Epping NSW 1710, Australia | http://www.atnf.csiro.au/~wbrouw/
------------------------------------------------------------------------------