diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2005-06-06 17:29:41 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2005-06-06 17:29:41 +0000 |
commit | 5e97d404553157c7d74c399907b60125111f130f (patch) | |
tree | d1edb6ce6bd660310edc4d54628d90e79e651a0b /gcc/cp/cp-tree.def | |
parent | 2fecaef4af7206fbae14906000e8c81007514706 (diff) | |
download | gcc-5e97d404553157c7d74c399907b60125111f130f.zip gcc-5e97d404553157c7d74c399907b60125111f130f.tar.gz gcc-5e97d404553157c7d74c399907b60125111f130f.tar.bz2 |
re PR c++/21903 (Default argument of template function causes a compile-time error)
cp:
PR 21903
* cp-tree.def (DEFAULT_ARG): Document TREE_CHAIN use.
* parser.c (cp_parser_late_parsing_default_args): Propagate parsed
argument to any early instantiations.
* pt.c (tsubst_arg_types): Chain early instantiation of default arg.
testsuite:
PR 21903
* g++.dg/parse/defarg9.C: New.
From-SVN: r100669
Diffstat (limited to 'gcc/cp/cp-tree.def')
-rw-r--r-- | gcc/cp/cp-tree.def | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def index c42dbfb..2728467 100644 --- a/gcc/cp/cp-tree.def +++ b/gcc/cp/cp-tree.def @@ -206,7 +206,9 @@ DEFTREECODE (USING_DECL, "using_decl", tcc_declaration, 0) /* A using directive. The operand is USING_STMT_NAMESPACE. */ DEFTREECODE (USING_STMT, "using_directive", tcc_statement, 1) -/* An un-parsed default argument. Looks like an IDENTIFIER_NODE. */ +/* An un-parsed default argument. Looks like an IDENTIFIER_NODE. + TREE_CHAIN is used to hold instantiations of functions that had to + be instantiated before the argument was parsed. */ DEFTREECODE (DEFAULT_ARG, "default_arg", tcc_exceptional, 0) /* A template-id, like foo<int>. The first operand is the template. |