g++ -O0 -g3 -Wall -c -o assign1.o ../assign1.cpp ../assign1.cpp:99: warning: `class IntPrinter' has virtual functions but non-virtual destructor I got an internal compiler error from my code when I forgot to scope my template class destructor function properly. The destructor also contains a local class, though I don't think it's related to the error. Since it results from a syntax error, it's probably not that serious, though a more helpful error message would be nice rather than blowing up. I'll attach preprocessed source in just a second. Reproducible: Didn't try Steps to Reproduce: 1.Define a template class. 2.Define the destructor of the template class outside the body of the class, however, make the following error when declaring it: template<typename T>::~ClassName() { //code here }; Note the missing class name before the scope resolution operator 3.Compile the program containing the class Actual Results: ../assign1.cpp:152: Internal compiler error in grokdeclarator, at cp/decl.c: 9857 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugs.gentoo.org/> for instructions. make: *** [assign1.o] Error 1 Expected Results: Emitted an error message indicating the missing class name on the scope resolution operator.
Created attachment 25088 [details] Preprocessed Source This preprocessed source is from the code which generated the error.
3.3.2 is going stable in a bit, I will rather like to fix it there (if still and issue).
Sounds fine to me... like I said, it comes out of a syntax error (one which should be extremely rare... I'm not entirely sure what I was thinking when I typed that code in:) so it's easily worked around.
so is this still broken with 3.3.2 ? you didnt attach the actual .cpp so i cant test it myself :)
No reply, assuming fixed.