diff options
| author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-02 18:52:16 +0000 |
|---|---|---|
| committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-02 18:52:16 +0000 |
| commit | e310e8dd9b00ed6e4b61417bc95fc6ccc057ee90 (patch) | |
| tree | 81299072d7ee64d2599788c3e47f00daaea546e5 /gcc/cp/semantics.c | |
| parent | 68faebf45b95738cc003189a646a6c9bfa1d1ee0 (diff) | |
| download | ppe42-gcc-e310e8dd9b00ed6e4b61417bc95fc6ccc057ee90.tar.gz ppe42-gcc-e310e8dd9b00ed6e4b61417bc95fc6ccc057ee90.zip | |
cp:
PR c++/9447
* cp-tree.def (USING_DECL): Document its type.
* class.c (pushclass): If we're entering a template, push any
dependent using decls it has.
* decl2.c (do_class_using_decl): Refactor. Type is NULL iff it is
a dependent scope.
* pt.c (tsubst_decl) <USING_DECL case>: Set type.
(tsubst): Remove USING_DECL checks.
(type_dependent_expression_p): Remove USING_DECL case.
* semantics.c (finish_member_declaration): A USING_DECL's type
indicates whether it is dependent.
testsuite:
PR c++/9447
* g++.dg/template/using7.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70107 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
| -rw-r--r-- | gcc/cp/semantics.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 11f5ff045d3..0931e891e04 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2099,8 +2099,7 @@ finish_member_declaration (tree decl) /*friend_p=*/0); } /* Enter the DECL into the scope of the class. */ - else if ((TREE_CODE (decl) == USING_DECL && !processing_template_decl - && !dependent_type_p (DECL_INITIAL (decl))) + else if ((TREE_CODE (decl) == USING_DECL && TREE_TYPE (decl)) || pushdecl_class_level (decl)) { /* All TYPE_DECLs go at the end of TYPE_FIELDS. Ordinary fields |

