From: Mark Mitchell Date: Wed, 20 Oct 1999 07:02:30 +0000 (+0000) Subject: cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template parameters as having namespa... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f71f6300ab2afc6948ecaa1600afdaa8aee5d33;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5a1d0e3293a..2a9e50ffbae 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1999-10-20 Mark Mitchell + + * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template + parameters as having namespace scope. + 1999-10-19 Mark Mitchell * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 3246e5af875..425ca18dcbd 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) \ 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 index 00000000000..81f9424ec5b --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/debug1.C @@ -0,0 +1,8 @@ +// Build don't link: +// Special g++ Options: -g +// Origin: Jim Wilson + +template class _Oper, + template class _Meta1, + template class _Meta2, + class _Dom1, class _Dom2> class _BinClos;