Correct the version check for non-constant __attribute__((aligned(x))) from GCC
4.3 and up to GCC 4.6 and up.
Bug
MODIFY
thrust/complex.h
thrust/complex.h
@@ -81,8 +81,8 @@ struct complex_storage;
};
#elif (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC) \
|| ( (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \
- && (THRUST_GCC_VERSION < 40300))
- // C++03 implementation for MSVC and GCC <= 4.2.
+ && (THRUST_GCC_VERSION < 40600))
+ // C++03 implementation for MSVC and GCC <= 4.5.
//
// We have to implement `aligned_type` with specializations for MSVC
// and GCC 4.2 and older because they require literals as arguments to
@@ -128,7 +128,7 @@ struct complex_storage;
#undef THRUST_DEFINE_COMPLEX_STORAGE_SPECIALIZATION
#else
- // C++03 implementation for GCC > 4.2, Clang, PGI, ICPC, and xlC.
+ // C++03 implementation for GCC > 4.5, Clang, PGI, ICPC, and xlC.
template <typename T, std::size_t Align>
struct complex_storage
{

MODIFY
thrust/detail/alignment.h
thrust/detail/alignment.h
@@ -108,8 +108,8 @@ struct aligned_type;
};
#elif (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC) \
|| ( (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \
- && (THRUST_GCC_VERSION < 40300))
- // C++03 implementation for MSVC and GCC <= 4.2.
+ && (THRUST_GCC_VERSION < 40600))
+ // C++03 implementation for MSVC and GCC <= 4.5.
//
// We have to implement `aligned_type` with specializations for MSVC
// and GCC 4.2.x and older because they require literals as arguments to
@@ -146,7 +146,7 @@ struct aligned_type;
#undef THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION
#else
- // C++03 implementation for GCC > 4.2, Clang, PGI, ICPC, and xlC.
+ // C++03 implementation for GCC > 4.5, Clang, PGI, ICPC, and xlC.
template <std::size_t Align>
struct aligned_type
{

Correct the version check for non-constant __attribute__((aligned(x))) from GCC
4.3 and up to GCC 4.6 and up.

Bug 2509847