This is the mail archive of the gcc-patches@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]

Re: [C++ PATCH] Avoid ice-on-invalid in xref_basetypes (PR c++/34089)


Jakub Jelinek wrote:

> 2007-11-19  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c++/34089
> 	* parser.c (cp_parser_class_specifier): Don't call xref_basetypes
> 	if type is not aggregate type.
> 
> 	* g++.dg/template/crash74.C: New test.

This seems like it would work, but why are we event accepting this code
in cp_parser_class_head?

+template<typename F> void foo () { }
+template<typename F> struct foo<F> { };

Here, we know that foo is not a name for a class template, so we should
be able to detect the error at that point.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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