aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.def
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2005-06-08 11:49:23 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2005-06-08 11:49:23 +0000
commit98ed9dae3ad020898a04cbf7363d51647b441ad6 (patch)
tree33d1230b127cd93152bb163e84c576691088bbac /gcc/cp/cp-tree.def
parentcb6d4a9fce89e5bea9476338870125bac9b83e96 (diff)
downloadgcc-98ed9dae3ad020898a04cbf7363d51647b441ad6.zip
gcc-98ed9dae3ad020898a04cbf7363d51647b441ad6.tar.gz
gcc-98ed9dae3ad020898a04cbf7363d51647b441ad6.tar.bz2
re PR c++/19497 (Invalid declaration in template diagnosed too late)
cp: PR c++/19497 * cp-tree.def (USING_DECL): Update documentation. * cp-tree.h (DECL_DEPENDENT_P): New. (USING_DECL_DECLS, USING_DECL_SCOPE): New. * class.c (handle_using_decl): Move most of the processing to ... * name-lookup.c (do_class_using_decl): ... here. Make stricter. (push_using_decl): Use USING_DECL_SCOPE. (cp_emit_debug_info_for_using): Make extern. * cxx-pretty-print.c (pp_cxx_statement) <USING_DECL case>: Adjust. * name-lookup.h (cp_emit_debug_info_for_using): Declare. * pt.c (tsubst_decl) <USING_DECL case>: Use do_class_using_decl when tsubsting. (tsubst_expr): Use USING_DECL_SCOPE. * search.c (lookup_field_1): Use DECL_DEPENDENT_P. * semantics.c (finish_member_declaration): Likewise. testsuite: PR c++/19497 * g++.dg/inherit/using5.C: New. * g++.dg/inherit/using6.C: New. From-SVN: r100757
Diffstat (limited to 'gcc/cp/cp-tree.def')
-rw-r--r--gcc/cp/cp-tree.def8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def
index aa0ea83..894b62d 100644
--- a/gcc/cp/cp-tree.def
+++ b/gcc/cp/cp-tree.def
@@ -197,10 +197,10 @@ DEFTREECODE (BOUND_TEMPLATE_TEMPLATE_PARM, "bound_template_template_parm",
TYPE_NAME is an IDENTIFIER_NODE for `C', the member class template. */
DEFTREECODE (UNBOUND_CLASS_TEMPLATE, "unbound_class_template", tcc_type, 0)
-/* A using declaration. DECL_INITIAL contains the specified scope.
- This is not an alias, but is later expanded into multiple aliases.
- The decl will have a NULL_TYPE iff the scope is a dependent scope,
- otherwise it will have a void type. */
+/* A using declaration. USING_DECL_SCOPE contains the specified
+ scope. In a member using decl, unless DECL_DEPENDENT_P is true,
+ USING_DECL_DECLS contains the _DECL or OVERLOAD so named. This is
+ not an alias, but is later expanded into multiple aliases. */
DEFTREECODE (USING_DECL, "using_decl", tcc_declaration, 0)
/* A using directive. The operand is USING_STMT_NAMESPACE. */