Skip to content

Commit 0d2bcb3

Browse files
committed
Correct the version check for non-constant __attribute__((aligned(x))) from GCC
4.3 and up to GCC 4.6 and up. Bug 2509847
1 parent 16fd8f3 commit 0d2bcb3

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

thrust/complex.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ struct complex_storage;
8080
};
8181
#elif (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC) \
8282
|| ( (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \
83-
&& (THRUST_GCC_VERSION < 40300))
84-
// C++03 implementation for MSVC and GCC <= 4.2.
83+
&& (THRUST_GCC_VERSION < 40600))
84+
// C++03 implementation for MSVC and GCC <= 4.5.
8585
//
8686
// We have to implement `aligned_type` with specializations for MSVC
8787
// and GCC 4.2 and older because they require literals as arguments to
@@ -127,7 +127,7 @@ struct complex_storage;
127127

128128
#undef THRUST_DEFINE_COMPLEX_STORAGE_SPECIALIZATION
129129
#else
130-
// C++03 implementation for GCC > 4.2, Clang, PGI, ICPC, and xlC.
130+
// C++03 implementation for GCC > 4.5, Clang, PGI, ICPC, and xlC.
131131
template <typename T, std::size_t Align>
132132
struct complex_storage
133133
{

thrust/detail/alignment.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ struct aligned_type;
108108
};
109109
#elif (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_MSVC) \
110110
|| ( (THRUST_HOST_COMPILER == THRUST_HOST_COMPILER_GCC) \
111-
&& (THRUST_GCC_VERSION < 40300))
112-
// C++03 implementation for MSVC and GCC <= 4.2.
111+
&& (THRUST_GCC_VERSION < 40600))
112+
// C++03 implementation for MSVC and GCC <= 4.5.
113113
//
114114
// We have to implement `aligned_type` with specializations for MSVC
115115
// and GCC 4.2.x and older because they require literals as arguments to
@@ -146,7 +146,7 @@ struct aligned_type;
146146

147147
#undef THRUST_DEFINE_ALIGNED_TYPE_SPECIALIZATION
148148
#else
149-
// C++03 implementation for GCC > 4.2, Clang, PGI, ICPC, and xlC.
149+
// C++03 implementation for GCC > 4.5, Clang, PGI, ICPC, and xlC.
150150
template <std::size_t Align>
151151
struct aligned_type
152152
{

0 commit comments

Comments
 (0)