]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR c++/19407 (vector keyword in typedef inside template struct ignored)
authorJason Merrill <jason@redhat.com>
Sun, 23 Sep 2007 02:36:34 +0000 (22:36 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Sun, 23 Sep 2007 02:36:34 +0000 (22:36 -0400)
commita7f6bc8c748862257b9b6e22034fd4ae0ffd4c38
tree17a3573bc82b532229f930f45caf02beb84bdead
parent1e74fb44cdb05432d3eb116dc80e1b0d4f86889d
re PR c++/19407 (vector keyword in typedef inside template struct ignored)

        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.

From-SVN: r128681
gcc/ChangeLog
gcc/attribs.c
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/ext/attrib20.C
gcc/testsuite/g++.dg/ext/tmplattr5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/typedef7.C [new file with mode: 0644]
gcc/tree.h