This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11991] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:282 when applying typeid operator to template template parameter


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]