diff options
author | Richard Sandiford <richard@codesourcery.com> | 2007-09-04 15:53:21 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-09-04 15:53:21 +0000 |
commit | 4c5bae34c163fa87e5c137e71d4be728d4b21291 (patch) | |
tree | 7bd4d6a1ec30200fe1cae2af28214b0f38d7ff4b | |
parent | 16ae1645b19b0610567841aa48e3440b3806199e (diff) | |
download | gcc-4c5bae34c163fa87e5c137e71d4be728d4b21291.zip gcc-4c5bae34c163fa87e5c137e71d4be728d4b21291.tar.gz gcc-4c5bae34c163fa87e5c137e71d4be728d4b21291.tar.bz2 |
decl.c (cp_finish_decl): Call determine_visibility before make_rtl_for_nonlocal_decl.
gcc/cp/
* decl.c (cp_finish_decl): Call determine_visibility before
make_rtl_for_nonlocal_decl.
From-SVN: r128091
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 169cac2..63b7b20 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2007-09-04 Richard Sandiford <richard@codesourcery.com> + + * decl.c (cp_finish_decl): Call determine_visibility before + make_rtl_for_nonlocal_decl. + 2007-09-04 Jason Merrill <jason@redhat.com> PR c++/14032 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index fba084d..1b7012c 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -5463,6 +5463,9 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, maybe_commonize_var (decl); } + /* This needs to happen after the linkage is set. */ + determine_visibility (decl); + make_rtl_for_nonlocal_decl (decl, init, asmspec); /* Check for abstractness of the type. Notice that there is no @@ -5474,9 +5477,6 @@ cp_finish_decl (tree decl, tree init, bool init_const_expr_p, else abstract_virtuals_error (decl, type); - /* This needs to happen after the linkage is set. */ - determine_visibility (decl); - if (TREE_CODE (decl) == FUNCTION_DECL || TREE_TYPE (decl) == error_mark_node) /* No initialization required. */ |