This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Internal compiler error 9
- To: markj at ibmoto dot com (Mark Johnstone)
- Subject: Internal compiler error 9
- From: Mark Mitchell <mmitchell at usa dot net>
- Date: Wed, 7 Jan 1998 00:59:39 GMT
- Cc: egcs-bugs at cygnus dot com
- References: <199801070214.UAA40562@pita.ibmoto.com>
- Reply-To: mmitchell at usa dot net
>>>>> "Mark" == Mark Johnstone <markj@ibmoto.com> writes:
Mark> Hello,
Mark> Here is a small test case that generates in internal
Mark> compiler error 9. This test case is a very slight
Mark> modification on the previous bug I reported a few minutes
Mark> ago:
Mark> test.h:
Mark> #include<iostream.h>
Mark> struct test_box { void print(void) {cout << "this is a test"
Mark> << endl;} };
Mark> void test<class BOX> (test_box *);
Mark> class test_square { friend void test<class BOX> (test_box
Mark> *); }
Mark> test.C:
Mark> #include "test.h"
Mark> template <class BOX> void test(BOX *the_box) {
the_box-> print();
Mark> };
Mark> template void test<> (test_box *);
Mark> donatello:~/tmp> g++ -c -v -fno-implicit-templates test.C
Mark> In file included from test.C:1: test.h:12: Internal compiler
Mark> error 9. test.h:12: Please submit a full bug report to
Mark> `egcs-bugs@cygnus.com'.
Patches I have already submitted (but not all of them made it to this
list), cause the following sensible sequence of error messages on this
code:
supernova% test-g++ -c test.cc
test.cc:8: explicit specialization not preceded by `template <>'
test.cc:15: semicolon missing after declaration of `test_square'
test.cc:15: parse error before `template'
test.cc:20: no matching template for `test<>(test_box *)' found
--
Mark Mitchell mmitchell@usa.net
Stanford University http://www.stanford.edu