From: Jason Merrill Date: Sun, 16 Aug 2009 17:42:48 +0000 (-0400) Subject: * decl2.c (finish_static_data_member_decl): Don't set TREE_USED. X-Git-Tag: releases/gcc-4.5.0~3996 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d3ece023f3547db2d77a2d96ce0b8294815edcb3;p=thirdparty%2Fgcc.git * decl2.c (finish_static_data_member_decl): Don't set TREE_USED. From-SVN: r150806 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e5ca35d90e57..9a694d922fa8 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2009-08-15 Jason Merrill + * 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 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 4644427eb030..f78508b99c3f 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;