aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2001-05-01 12:56:12 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2001-05-01 12:56:12 +0000
commit9da99f7d83904a9b4b3e4479c54ecf2934f9281e (patch)
treeff484f8e23f30657ae172dcf3632428050102832 /gcc/cp/pt.c
parent6496a589dfe14041da10691b70be2e1825829c2b (diff)
downloadgcc-9da99f7d83904a9b4b3e4479c54ecf2934f9281e.zip
gcc-9da99f7d83904a9b4b3e4479c54ecf2934f9281e.tar.gz
gcc-9da99f7d83904a9b4b3e4479c54ecf2934f9281e.tar.bz2
cp-tree.def (USING_STMT): New statement node.
cp: * cp-tree.def (USING_STMT): New statement node. * cp-tree.h (USING_STMT_NAMESPACE): New macro. * decl2.c (do_using_directive): Add USING_STMT to statement tree. Don't emit errors when processing template decl. * pt.c (tsubst_expr, USING_STMT case): New case. * semantics.c (cp_expand_stmt, USING_STMT case): New case. testsuite: * g++.old-deja/g++.ns/template17.C: New test. From-SVN: r41724
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 2a1dc44..c0cd2eb 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -6886,7 +6886,7 @@ tsubst_copy (t, args, complain, in_decl)
case LOOKUP_EXPR:
{
- /* We must tsbust into a LOOKUP_EXPR in case the names to
+ /* We must tsubst into a LOOKUP_EXPR in case the names to
which it refers is a conversion operator; in that case the
name will change. We avoid making unnecessary copies,
however. */
@@ -7211,6 +7211,12 @@ tsubst_expr (t, args, complain, in_decl)
args, complain, in_decl));
break;
+ case USING_STMT:
+ prep_stmt (t);
+ do_using_directive (tsubst_expr (USING_STMT_NAMESPACE (t),
+ args, complain, in_decl));
+ break;
+
case DECL_STMT:
{
tree decl;