aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-10-20 07:02:30 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-10-20 07:02:30 +0000
commit4f71f6300ab2afc6948ecaa1600afdaa8aee5d33 (patch)
treef5ea740c56433c23e136b7ecd922baace46f49d6 /gcc/cp
parent7978192f77a85871bef9c4de7ab501c07f8b69cf (diff)
downloadgcc-4f71f6300ab2afc6948ecaa1600afdaa8aee5d33.zip
gcc-4f71f6300ab2afc6948ecaa1600afdaa8aee5d33.tar.gz
gcc-4f71f6300ab2afc6948ecaa1600afdaa8aee5d33.tar.bz2
cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template parameters as having namespace scope.
* cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template parameters as having namespace scope. From-SVN: r30097
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/cp-tree.h6
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5a1d0e3..2a9e50f 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+1999-10-20 Mark Mitchell <mark@codesourcery.com>
+
+ * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
+ parameters as having namespace scope.
+
1999-10-19 Mark Mitchell <mark@codesourcery.com>
* method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 3246e5a..425ca18 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -1766,9 +1766,9 @@ struct lang_decl
#define DECL_VIRTUAL_CONTEXT(NODE) DECL_CONTEXT (NODE)
/* 1 iff NODE has namespace scope, including the global namespace. */
-#define DECL_NAMESPACE_SCOPE_P(NODE) \
- (DECL_CONTEXT (NODE) == NULL_TREE \
- || TREE_CODE (DECL_CONTEXT (NODE)) == NAMESPACE_DECL)
+#define DECL_NAMESPACE_SCOPE_P(NODE) \
+ (!DECL_TEMPLATE_PARM_P (NODE) \
+ && TREE_CODE (CP_DECL_CONTEXT (NODE)) == NAMESPACE_DECL)
/* 1 iff NODE is a class member. */
#define DECL_CLASS_SCOPE_P(NODE) \