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++/16224] [3.3/3.4/3.5 Regression] internal compiler error: in write_unscoped_name (template/namespace)


------- Additional Comments From bangerth at dealii dot org  2004-06-27 21:22 -------
Here's a redux: 
--------------------- 
namespace io { 
  template <typename> int foo(); 
} 
 
using namespace io; 
 
template<> int foo<int>(); 
 
int a = foo<int>(); 
------------------- 
 
g/x> /home/bangerth/bin/gcc-3.5-pre/bin/c++ -c x.cc 
x.cc:9: internal compiler error: in write_unscoped_name, at cp/mangle.c:832 
Please submit a full bug report, 
with preprocessed source if appropriate. 
See <URL:http://gcc.gnu.org/bugs.html> for instructions. 
 
The code is invalid, though: you can't declare the existence of a 
specialization of foo() in global namespace without declaring the 
existence of a general template first. It does not correspond 
to the general template in namespace io. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |ice-on-invalid-code


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16224


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