This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11991] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:282 when applying typeid operator to template template parameter
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Aug 2003 14:33:17 -0000
- Subject: [Bug c++/11991] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:282 when applying typeid operator to template template parameter
- References: <20030820115542.11991.blaz@blazlabs.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11991
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Keywords| |ice-on-invalid-code
Resolution| |FIXED
------- Additional Comments From bangerth at dealii dot org 2003-08-20 14:33 -------
Confirmed with gcc 2.96, 3.2 and 3.3, but already fixed in mainline. The code in question is
---------------------------
#include <typeinfo>
template <template <class> class T> struct A {
void error() {
typeid(T).name();
}
};
template <class T> struct B {};
template void A<B>::error();
-------------------------------------------
which of course is invalid since T in typeid(T) is not a type but a template. Present mainline
gives the following error message:
tmp/g> ../build-gcc/gcc-install/bin/c++ -c x.cc
x.cc: In member function `void A<T>::error()':
x.cc:6: error: missing template arguments
W.