diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2000-11-17 10:24:05 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2000-11-17 10:24:05 +0000 |
commit | 35728a80fc263329299d40fc81ed3dfffd164cf0 (patch) | |
tree | 4855606a5930e0061f5125564877ab956b83e0a8 /gcc/cp | |
parent | 5cce22b6c2bfebd556b36a9c89d1bdf3eee900ae (diff) | |
download | gcc-35728a80fc263329299d40fc81ed3dfffd164cf0.zip gcc-35728a80fc263329299d40fc81ed3dfffd164cf0.tar.gz gcc-35728a80fc263329299d40fc81ed3dfffd164cf0.tar.bz2 |
pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
cp:
* pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
testsuite:
* g++.old-deja/g++.pt/instantiate8.C: New test.
From-SVN: r37518
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 1cbeac8..63f97f4 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2000-11-17 Nathan Sidwell <nathan@codesourcery.com> + * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type. + +2000-11-17 Nathan Sidwell <nathan@codesourcery.com> + * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro. * decl.c (grokdeclarator): Don't reject void parms here. (require_complete_types_for_parms): Simplify, use diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index dd190ea..c281636 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -7150,6 +7150,9 @@ tsubst_expr (t, args, complain, in_decl) init = tsubst_expr (init, args, complain, in_decl); if (decl != error_mark_node) { + if (TREE_CODE (decl) != TYPE_DECL) + /* Make sure the type is instantiated now. */ + complete_type (type); if (init) DECL_INITIAL (decl) = error_mark_node; /* By marking the declaration as instantiated, we avoid |