re PR c++/7586 (Incorrect handling of attributes in template codes)
authorJason Merrill <jason@redhat.com>
Thu, 20 Sep 2007 14:13:00 +0000 (10:13 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Thu, 20 Sep 2007 14:13:00 +0000 (10:13 -0400)
commit56d0c6e3f540686a9d7e240c536b7c2fe361bbe2
tree497200eb12dfd940a8293d497ecc5a24595fb6ef
parent152315665ec17e11bad055588958922ae831def8
re PR c++/7586 (Incorrect handling of attributes in template codes)

        PR c++/7586
        * pt.c (tsubst): Handle typedefs by looking for the specialization.
        (retrieve_specialization): Only tagged types use
        DECL_TEMPLATE_INSTANTIATIONS.
        (instantiate_class_template): Push nested classes too.
        (tsubst_decl) [TYPE_DECL]: Only check for canonical decl for
        tagged types.
        * cp-tree.h (MAYBE_TAGGED_TYPE_P): New macro.
        * init.c (is_aggr_type): Remove redundant tests.
        * class.c (push_nested_class): Use CLASS_TYPE_P.

From-SVN: r128621
gcc/cp/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/init.c
gcc/cp/pt.c
gcc/testsuite/g++.dg/ext/tmplattr3.C
gcc/testsuite/g++.dg/ext/tmplattr4.C [new file with mode: 0644]