From e3d2508d72d66372c23e3383e2eecf3713329740 Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Mon, 18 Oct 1999 08:40:20 +0000 Subject: [PATCH] c-decl.c (pushdecl): Use TYPE_CONTEXT rather than TREE_PERMANENT. * c-decl.c (pushdecl): Use TYPE_CONTEXT rather than TREE_PERMANENT. (finish_decl): Duplicate test for TREE_ASM_WRITTEN in else branch of if that tests TREE_PERMANENT. From-SVN: r30068 --- gcc/ChangeLog | 6 ++++++ gcc/c-decl.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4bbe8e9b077d..8dcde75699b1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Mon Oct 18 02:38:46 1999 Bernd Schmidt + + * c-decl.c (pushdecl): Use TYPE_CONTEXT rather than TREE_PERMANENT. + (finish_decl): Duplicate test for TREE_ASM_WRITTEN in else branch of + if that tests TREE_PERMANENT. + Mon Oct 18 01:41:35 1999 Jeffrey A Law (law@cygnus.com) * combine.c (get_last_value): If the last set of a register diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 3a38c4fc76ad..ab1c05374b05 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2220,7 +2220,7 @@ pushdecl (x) { if (type == error_mark_node) break; - if (! TREE_PERMANENT (type)) + if (! TYPE_CONTEXT (type)) { warning_with_decl (x, "type of external `%s' is not global"); /* By exiting the loop early, we leave TYPE nonzero, @@ -3606,7 +3606,9 @@ finish_decl (decl, init, asmspec_tree) { /* This is a no-op in c-lang.c or something real in objc-actions.c. */ maybe_objc_check_decl (decl); - rest_of_decl_compilation (decl, asmspec, DECL_CONTEXT (decl) == 0, + rest_of_decl_compilation (decl, asmspec, + (DECL_CONTEXT (decl) == 0 + || TREE_ASM_WRITTEN (decl)), 0); } if (DECL_CONTEXT (decl) != 0)