From 437081d7f58fc5feaaa1f8afb9739746258ce41b Mon Sep 17 00:00:00 2001 From: Robert Bowdidge Date: Tue, 21 Oct 2003 16:41:53 -0700 Subject: [PATCH] decl.c (cp_finish_decl): Remove clause intended for asm directives in struct or class fields... * cp/decl.c (cp_finish_decl): Remove clause intended for asm directives in struct or class fields: this code is never executed. From-SVN: r72775 --- gcc/cp/ChangeLog | 4 ++++ gcc/cp/decl.c | 12 ++---------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b7024096d6e..df0297ae5b2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2003-10-21 Robert Bowdidge + * decl.c (cp_finish_decl): Remove clause intended for asm directives + in struct or class fields: this code is never executed. + 2003-10-22 Kriang Lerdsuwanakij * decl.c (start_decl): Exit if push_template_decl returns diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 7b27feb5066..1951b251a4b 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4677,7 +4677,7 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags) /* If a name was specified, get the string. */ if (global_scope_p (current_binding_level)) asmspec_tree = maybe_apply_renaming_pragma (decl, asmspec_tree); - if (asmspec_tree) + if (asmspec_tree) asmspec = TREE_STRING_POINTER (asmspec_tree); if (init && TREE_CODE (init) == NAMESPACE_DECL) @@ -4763,15 +4763,7 @@ cp_finish_decl (tree decl, tree init, tree asmspec_tree, int flags) TREE_READONLY (decl) = 0; } - if (TREE_CODE (decl) == FIELD_DECL && asmspec) - { - /* This must override the asm specifier which was placed by - grokclassfn. Lay this out fresh. */ - SET_DECL_RTL (TREE_TYPE (decl), NULL_RTX); - SET_DECL_ASSEMBLER_NAME (decl, get_identifier (asmspec)); - make_decl_rtl (decl, asmspec); - } - else if (TREE_CODE (decl) == VAR_DECL) + if (TREE_CODE (decl) == VAR_DECL) { /* Only PODs can have thread-local storage. Other types may require various kinds of non-trivial initialization. */ -- 2.30.2