diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/function.cc | 8 | ||||
-rw-r--r-- | gcc/system.h | 6 | ||||
-rw-r--r-- | gcc/vec.h | 15 |
3 files changed, 0 insertions, 29 deletions
diff --git a/gcc/function.cc b/gcc/function.cc index dd2c113..e92384a 100644 --- a/gcc/function.cc +++ b/gcc/function.cc @@ -2429,15 +2429,7 @@ assign_parm_find_data_types (struct assign_parm_data_all *all, tree parm, { int unsignedp; -#ifndef BROKEN_VALUE_INITIALIZATION *data = assign_parm_data_one (); -#else - /* Old versions of GCC used to miscompile the above by only initializing - the members with explicit constructors and copying garbage - to the other members. */ - assign_parm_data_one zero_data = {}; - *data = zero_data; -#endif /* NAMED_ARG is a misnomer. We really mean 'non-variadic'. */ if (!cfun->stdarg) diff --git a/gcc/system.h b/gcc/system.h index 5109c60..e924152 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -905,12 +905,6 @@ extern void fancy_abort (const char *, int, const char *) /* Some compilers do not allow the use of unsigned char in bitfields. */ #define BOOL_BITFIELD unsigned int -/* GCC older than 4.4 have broken C++ value initialization handling, see - PR11309, PR30111, PR33916, PR82939 and PR84405 for more details. */ -#if GCC_VERSION > 0 && GCC_VERSION < 4004 && !defined(__clang__) -# define BROKEN_VALUE_INITIALIZATION -#endif - /* As the last action in this file, we poison the identifiers that shouldn't be used. Note, luckily gcc-3.0's token-based integrated preprocessor won't trip on poisoned identifiers that arrive from @@ -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 (); } |