diff options
Diffstat (limited to 'gcc/vec.h')
-rw-r--r-- | gcc/vec.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/vec.h b/gcc/vec.h index 24f57b183a3..c707bccf51c 100644 --- a/gcc/vec.h +++ b/gcc/vec.h @@ -490,8 +490,12 @@ template <typename T> inline void vec_default_construct (T *dst, unsigned n) { +#ifndef BROKEN_VALUE_INITIALIZATION for ( ; n; ++dst, --n) ::new (static_cast<void*>(dst)) T (); +#else + memset (dst, '\0', sizeof (T) * n); +#endif } /* Copy-construct N elements in DST from *SRC. */ |