This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
GNU C++ version 2.96 19991025 (experimental) (sparc-sun-solaris2.7): Internal compiler error.
- To: gcc-bugs at gcc dot gnu dot org
- Subject: GNU C++ version 2.96 19991025 (experimental) (sparc-sun-solaris2.7): Internal compiler error.
- From: <robert at cynapps dot com>
- Date: Thu, 28 Oct 1999 11:06:54 -0700 (PDT)
- CC: acg at cynapps dot com, jra at cynapps dot com
- Reply-To: robert at cynapps dot com
Putting an extern inside a templated class causes an internal compiler
error.
OS: SunOS carlsbad 5.7 Generic sun4u sparc SUNW,Ultra-5_10
Releases: 2.96 19991013, and 19991025
g++ -DBUG -c -g -fPIC -D__sparc__ flat.cc -o bflat.o
flat.cc: In method `void Uint<W>::barf () [with unsigned int W = 1]':
flat.cc:15: instantiated from here
flat.cc:10: Internal compiler error.
flat.cc:10: Please submit a full bug report.
flat.cc:10: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.
make: *** [bflat.o] Error 1
flat.cc:
template<const unsigned int W>
class Uint {
public:
void barf();
};
template<const unsigned int W>
void Uint<W>::barf()
{
extern int Cynprofile;
};
main( int argc, char *argv[] ) {
Uint<1> port;
port.barf();
};
Robert A. Clark (408) 588-4000 x22 robert@cynapps.com
CynApps, 2520 Mission College Blvd., Suite 101
Santa Clara, CA 95054
www.cynapps.com