OSDN Git Service

* cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Oct 1999 07:02:30 +0000 (07:02 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Oct 1999 07:02:30 +0000 (07:02 +0000)
parameters as having namespace scope.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@30097 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/testsuite/g++.old-deja/g++.pt/debug1.C [new file with mode: 0644]

index 5a1d0e3..2a9e50f 100644 (file)
@@ -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.
index 3246e5a..425ca18 100644 (file)
@@ -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) \
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/debug1.C b/gcc/testsuite/g++.old-deja/g++.pt/debug1.C
new file mode 100644 (file)
index 0000000..81f9424
--- /dev/null
@@ -0,0 +1,8 @@
+// Build don't link:
+// Special g++ Options: -g
+// Origin: Jim Wilson <wilson@cygnus.com>
+
+template<template<class> class _Oper,
+    template<class, class> class _Meta1,
+    template<class, class> class _Meta2,
+    class _Dom1, class _Dom2> class _BinClos;