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++/15890] [3.3/3.4/3.5 regression] internal compiler error: in c_expand_expr, at c-common.c:4138


------- Additional Comments From jkherciueh at gmx dot net  2004-06-09 13:35 -------
> The code is invalid, btw: you can't declare operator delete a template 
> this way (how is the compiler supposed to figure out the value of 'T'?). 
>
> W. 

Sure, but if you ditch that "template< typename T >", the error won't show :-)


Kai-Uwe

ps.  I was mistaken about minimality. I forgot to take out the smart pointer
     template. Thus, this is shorter. It still triggers the internal error:


template < typename T >
void operator delete ( void* raw ) {
  delete raw;
}

class A { };

int main() {
   A* a = new A;
   delete a;
}

-- 


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


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