This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Member Template Instantiation bug in g++ 2.95.2
- To: bug-gcc at gnu dot org
- Subject: Member Template Instantiation bug in g++ 2.95.2
- From: Michael Burton <mburton at requiem dot yi dot org>
- Date: Mon, 22 May 2000 10:11:33 -0700 (PDT)
- cc: Michael Burton <mcburton at bigfoot dot com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
G++ 2.95.2, uname reports:
FreeBSD requiem.yi.org 4.0-RELEASE FreeBSD 4.0-RELEASE #7: Sat May 20
18:52:44 PDT 2000
This bug may already be well-known (I don't know how far along G++ has
gotten in member template support), but I didn't see it listed anywhere on
the web pages or info pages.
The following code produces an internal compiler error.
template <class T1>
struct s2 {
template <class T2> struct a {};
};
template <class T >
struct s1 {
typedef s2<T>::a<T> Op;
};
int main() {
s2<int> x; // BUG internal compiler error without
// this line.
s1<int> z;
return 0;
}
G++ output is as follows (if the specified src line is commented out):
bash-2.03$ g++ GnuBug.cc
GnuBug.cc: In instantiation of `s1<int>':
GnuBug.cc:15: instantiated from here
GnuBug.cc:8: Internal compiler error.
GnuBug.cc:8: Please submit a full bug report.
GnuBug.cc:8: See <URL:http://www.gnu.org/software/gcc/bugs.html> for
instructions.
Please let me know if you have any questions. Thanks
- -Michael Burton
- -------------------------------------------------------------------
Michael Burton Email: mcburton@bigfoot.com
Software Engineer Office: (650) 289-4636
MyCustoms.com Fax: (508) 632-8555
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (FreeBSD)
Comment: For info see http://www.gnupg.org
iD8DBQE5KWpJietpEwfqeTARAiMAAKCUWVoKMggp8b/dMSctfAsVMlqXbgCfcX3F
of99IgfpnxCxEPaAPqF9/XY=
=3DVI
-----END PGP SIGNATURE-----