Index: include/bits/basic_string.h =================================================================== --- include/bits/basic_string.h (revision 137528) +++ include/bits/basic_string.h (working copy) @@ -174,7 +174,8 @@ // The following storage is init'd to 0 by the linker, resulting // (carefully) in an empty string with one reference. - static size_type _S_empty_rep_storage[]; + static char _S_empty_rep_storage[] + __attribute__ ((__aligned__(__alignof__(size_t)))); static _Rep& _S_empty_rep() Index: include/bits/basic_string.tcc =================================================================== --- include/bits/basic_string.tcc (revision 137528) +++ include/bits/basic_string.tcc (working copy) @@ -75,10 +75,11 @@ // Linker sets _S_empty_rep_storage to all 0s (one reference, empty string) // at static init time (before static ctors are run). template - typename basic_string<_CharT, _Traits, _Alloc>::size_type + char basic_string<_CharT, _Traits, _Alloc>::_Rep::_S_empty_rep_storage[ - (sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) / - sizeof(size_type)]; + sizeof(size_type) + * ((sizeof(_Rep_base) + sizeof(_CharT) + sizeof(size_type) - 1) + / sizeof(size_type))]; // NB: This is the special case for Input Iterators, used in // istreambuf_iterators, etc.