aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-05-05 01:27:06 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-05-04 21:27:06 -0400
commit2addbe1dca329d6a5c94be60f2512e05787e1fed (patch)
tree5a18ae7b4648a1141acc035141e7f86ae0c82e17 /gcc/tree.c
parent2e14a41b63bb3ac89e91b85e58ae3d0f3e3798c9 (diff)
downloadgcc-2addbe1dca329d6a5c94be60f2512e05787e1fed.zip
gcc-2addbe1dca329d6a5c94be60f2512e05787e1fed.tar.gz
gcc-2addbe1dca329d6a5c94be60f2512e05787e1fed.tar.bz2
tree.def: Add NAMESPACE_DECL.
* tree.def: Add NAMESPACE_DECL. * dwarfout.c (type_ok_for_scope): Ignore NAMESPACE_DECLs for now. * dwarf2out.c (push_decl_scope): Likewise. (scope_die_for): Likewise. * tree.c (decl_function_context): Use TREE_CODE_CLASS to determine how to get next context level. * cp-tree.def: Remove NAMESPACE_DECL. * cp/Makefile.in: Add .SUFFIXES. From-SVN: r19539
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 20805d5..ff608db 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -4654,11 +4654,9 @@ decl_function_context (decl)
while (context && TREE_CODE (context) != FUNCTION_DECL)
{
- if (TREE_CODE (context) == RECORD_TYPE
- || TREE_CODE (context) == UNION_TYPE
- || TREE_CODE (context) == QUAL_UNION_TYPE)
+ if (TREE_CODE_CLASS (TREE_CODE (context)) == 't')
context = TYPE_CONTEXT (context);
- else if (TREE_CODE (context) == TYPE_DECL)
+ else if (TREE_CODE_CLASS (TREE_CODE (context)) == 'd')
context = DECL_CONTEXT (context);
else if (TREE_CODE (context) == BLOCK)
context = BLOCK_SUPERCONTEXT (context);