aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-08-16 13:42:48 -0400
committerJason Merrill <jason@gcc.gnu.org>2009-08-16 13:42:48 -0400
commitd3ece023f3547db2d77a2d96ce0b8294815edcb3 (patch)
tree65b5dec0a9344e95050b43c13e24cdea07cf971c
parentb49bd3798d288b781b2562c03231cca3d5eb8e8c (diff)
downloadgcc-d3ece023f3547db2d77a2d96ce0b8294815edcb3.zip
gcc-d3ece023f3547db2d77a2d96ce0b8294815edcb3.tar.gz
gcc-d3ece023f3547db2d77a2d96ce0b8294815edcb3.tar.bz2
* decl2.c (finish_static_data_member_decl): Don't set TREE_USED.
From-SVN: r150806
-rw-r--r--gcc/cp/ChangeLog2
-rw-r--r--gcc/cp/decl2.c5
2 files changed, 3 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e5ca35d..9a694d92 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,5 +1,7 @@
2009-08-15 Jason Merrill <jason@redhat.com>
+ * decl2.c (finish_static_data_member_decl): Don't set TREE_USED.
+
* decl2.c (mark_used): It's ok to synthesize for default args now.
2009-08-10 Jason Merrill <jason@redhat.com>
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 4644427..f78508b 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -746,10 +746,7 @@ finish_static_data_member_decl (tree decl,
}
init = NULL_TREE;
}
- /* Force the compiler to know when an uninitialized static const
- member is being used. */
- if (CP_TYPE_CONST_P (TREE_TYPE (decl)) && init == 0)
- TREE_USED (decl) = 1;
+
DECL_INITIAL (decl) = init;
DECL_IN_AGGR_P (decl) = 1;