aboutsummaryrefslogtreecommitdiff
path: root/gcc/vec.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-09-27 10:38:54 +0200
committerJakub Jelinek <jakub@redhat.com>2023-09-27 10:38:54 +0200
commit3ba882c7b51ab1f14c62c748e989415834ccd9ce (patch)
treef39183d8fabfb0c108b3b576a91abd891b02e156 /gcc/vec.h
parentfcbbf158ee90400877f81185bb40b5870dca1558 (diff)
downloadgcc-3ba882c7b51ab1f14c62c748e989415834ccd9ce.zip
gcc-3ba882c7b51ab1f14c62c748e989415834ccd9ce.tar.gz
gcc-3ba882c7b51ab1f14c62c748e989415834ccd9ce.tar.bz2
remove workaround for GCC 4.1-4.3 [PR105606]
While looking into vec.h, I've noticed we still have a workaround for GCC 4.1-4.3 bugs. As we now use C++11 and thus need to be built by GCC 4.8 or later, I think this is now never used. 2023-09-27 Jakub Jelinek <jakub@redhat.com> PR c++/105606 * system.h (BROKEN_VALUE_INITIALIZATION): Don't define. * vec.h (vec_default_construct): Remove BROKEN_VALUE_INITIALIZATION workaround. * function.cc (assign_parm_find_data_types): Likewise.
Diffstat (limited to 'gcc/vec.h')
-rw-r--r--gcc/vec.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/gcc/vec.h b/gcc/vec.h
index 6f7b048..8a9a8d8 100644
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -512,21 +512,6 @@ template <typename T>
inline void
vec_default_construct (T *dst, unsigned n)
{
-#ifdef BROKEN_VALUE_INITIALIZATION
- /* Versions of GCC before 4.4 sometimes leave certain objects
- uninitialized when value initialized, though if the type has
- user defined default ctor, that ctor is invoked. As a workaround
- perform clearing first and then the value initialization, which
- fixes the case when value initialization doesn't initialize due to
- the bugs and should initialize to all zeros, but still allows
- vectors for types with user defined default ctor that initializes
- some or all elements to non-zero. If T has no user defined
- default ctor and some non-static data members have user defined
- default ctors that initialize to non-zero the workaround will
- still not work properly; in that case we just need to provide
- user defined default ctor. */
- memset (dst, '\0', sizeof (T) * n);
-#endif
for ( ; n; ++dst, --n)
::new (static_cast<void*>(dst)) T ();
}