mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-01-12 09:44:57 +08:00
pt.c (instantiate_class_template): Set up the DECL_INITIAL of member constants.
* pt.c (instantiate_class_template): Set up the DECL_INITIAL of member constants. g++.ns/template6.C * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in a ctor initializer. g++.other/typedef6.C From-SVN: r24875
This commit is contained in:
parent
1b528097cd
commit
94c82a77fd
@ -1,5 +1,11 @@
|
||||
1999-01-26 Jason Merrill <jason@yorick.cygnus.com>
|
||||
|
||||
* pt.c (instantiate_class_template): Set up the DECL_INITIAL of
|
||||
member constants.
|
||||
|
||||
* init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
|
||||
a ctor initializer.
|
||||
|
||||
* tree.c (equal_functions): Fix name in prototype.
|
||||
|
||||
* decl.c (push_local_binding): Add FLAGS argument.
|
||||
|
@ -898,7 +898,7 @@ expand_member_init (exp, name, init)
|
||||
|
||||
if (name && TREE_CODE (name) == TYPE_DECL)
|
||||
{
|
||||
basetype = TREE_TYPE (name);
|
||||
basetype = TYPE_MAIN_VARIANT (TREE_TYPE (name));
|
||||
name = DECL_NAME (name);
|
||||
}
|
||||
|
||||
|
@ -4748,6 +4748,10 @@ instantiate_class_template (type)
|
||||
{
|
||||
pending_statics = perm_tree_cons (NULL_TREE, r, pending_statics);
|
||||
/* Perhaps we should do more of grokfield here. */
|
||||
if (DECL_DEFINED_IN_CLASS_P (r))
|
||||
/* Set up DECL_INITIAL, since tsubst doesn't. */
|
||||
DECL_INITIAL (r) = tsubst_expr (DECL_INITIAL (t), args,
|
||||
NULL_TREE);
|
||||
start_decl_1 (r);
|
||||
DECL_IN_AGGR_P (r) = 1;
|
||||
DECL_EXTERNAL (r) = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user