diff options
Diffstat (limited to 'gcc/cp/decl2.c')
-rw-r--r-- | gcc/cp/decl2.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 37a21f7..97b3ee0 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -3366,21 +3366,7 @@ cp_write_global_declarations (void) /* If this static data member is needed, provide it to the back end. */ if (DECL_NOT_REALLY_EXTERN (decl) && decl_needed_p (decl)) - { - /* Error on - namespace { struct A { static int i; }; } - int foo () { return A::i; } - without A::i definition (which can't be defined in - a different CU because of the anonymous namespace). - Don't do this if DECL_INITIAL is set, because for - namespace { struct A { static const int i = 4; } }; - decl_needed_p won't reliably detect whether it was - really needed. */ - if (DECL_IN_AGGR_P (decl) && DECL_INITIAL (decl) == NULL_TREE) - error ("%Jstatic data member %qD used, but not defined", - decl, decl); - DECL_EXTERNAL (decl) = 0; - } + DECL_EXTERNAL (decl) = 0; } if (VEC_length (tree, pending_statics) != 0 && wrapup_global_declarations (VEC_address (tree, pending_statics), |