------- Comment #5 from jason at gcc dot gnu dot org 2007-09-23 02:36 ------- Subject: Bug 19407
Author: jason Date: Sun Sep 23 02:36:34 2007 New Revision: 128681 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128681 Log: PR c++/19407 * cp/cp-tree.h (ATTR_IS_DEPENDENT): New macro. (MAYBE_TAGGED_TYPE_P): Remove. * cp/pt.c (apply_late_template_attributes): Check ATTR_IS_DEPENDENT instead of calling is_late_template_attribute again. (tsubst_decl) [TYPE_DECL]: Just check if the name is the tag. (tsubst): A typedef is a TYPE_NAME != TYPE_MAIN_DECL. Don't crash on typedefs from non-template classes. * cp/decl2.c (grokfield): Don't sorry about attrs on template parms. (is_late_template_attribute): All attributes applied to template parms or typename types are dependent. Static, take decl. (splice_template_attributes): Pass decl through. (save_template_attributes): Likewise. * attribs.c (lookup_attribute_spec): Split out... (decl_attributes): From here. * tree.h: Declare it. Added: trunk/gcc/testsuite/g++.dg/ext/tmplattr5.C trunk/gcc/testsuite/g++.dg/template/typedef7.C Modified: trunk/gcc/ChangeLog trunk/gcc/attribs.c trunk/gcc/cp/ChangeLog trunk/gcc/cp/cp-tree.h trunk/gcc/cp/decl2.c trunk/gcc/cp/pt.c trunk/gcc/testsuite/g++.dg/ext/attrib20.C trunk/gcc/tree.h -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19407