CI updates

This commit is contained in:
Markus F.X.J. Oberhumer
2024-07-28 18:01:54 +02:00
parent d6a29e582f
commit ada9081ea2
10 changed files with 47 additions and 18 deletions
+1 -1
View File
@@ -231,7 +231,7 @@ forceinline constexpr upx_uint64_t bswap64(upx_uint64_t v) noexcept { return std
#elif (ACC_CC_MSC)
ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4)
static_assert(sizeof(long) == 4);
// _byteswap_XXX is unfortunately *not* constexpr with current MSVC
forceinline bele_constexpr unsigned bswap16(unsigned v) noexcept {
+18
View File
@@ -210,6 +210,8 @@ typedef __PTRADDR_TYPE__ expected_ptraddr_t;
static_assert(std::is_integral<B>::value, ""); \
static_assert(std::is_signed<A>::value == std::is_signed<B>::value, ""); \
static_assert(std::is_unsigned<A>::value == std::is_unsigned<B>::value, ""); \
static_assert(std::is_signed<A>::value == !std::is_unsigned<A>::value, ""); \
static_assert(std::is_signed<B>::value == !std::is_unsigned<B>::value, ""); \
static_assert(sizeof(A) == sizeof(B), ""); \
static_assert(alignof(A) == alignof(B), "")
@@ -226,6 +228,10 @@ ASSERT_SAME_TYPE(uintptr_t, std::uintptr_t);
// true types
ASSERT_SAME_TYPE(ptrdiff_t, true_ptrdiff_t);
ASSERT_SAME_TYPE(size_t, true_size_t);
#if __cplusplus >= 201103L
typedef decltype(nullptr) true_nullptr_t;
static_assert(std::is_same<std::nullptr_t, true_nullptr_t>::value, "");
#endif
// expected types
#if defined(__PTRDIFF_TYPE__)
@@ -880,6 +886,18 @@ void upx_compiler_sanity_check(void) noexcept {
static_assert(sizeof(upx_off_t) >= 8);
static_assert(sizeof(upx_off_t) >= sizeof(long long));
// __int64
#if defined(_MSC_VER)
{
ASSERT_SAME_TYPE(long long, __int64);
ASSERT_SAME_TYPE(unsigned long long, unsigned __int64);
typedef __int64 my_int64;
typedef unsigned __int64 my_uint64;
ASSERT_SAME_TYPE(long long, my_int64);
ASSERT_SAME_TYPE(unsigned long long, my_uint64);
}
#endif
static_assert(sizeof(BE16) == 2);
static_assert(sizeof(BE32) == 4);
static_assert(sizeof(BE64) == 8);
+2 -2
View File
@@ -126,8 +126,8 @@ public:
protected:
// unpacker tests - these may throw exceptions
virtual bool testUnpackVersion(int version) const;
virtual bool testUnpackFormat(int format) const;
virtual bool testUnpackVersion(int version) const may_throw;
virtual bool testUnpackFormat(int format) const may_throw;
protected:
// implementation
+4
View File
@@ -773,8 +773,12 @@ inline void owner_free(OwningPointer(T)(&object)) noexcept {
#if defined(__clang__) || __GNUC__ != 7
template <class T>
inline void owner_delete(T (&array)[]) noexcept DELETED_FUNCTION;
template <class T>
inline void owner_free(T (&array)[]) noexcept DELETED_FUNCTION;
#endif
template <class T, std::size_t N>
inline void owner_delete(T (&array)[N]) noexcept DELETED_FUNCTION;
template <class T, std::size_t N>
inline void owner_free(T (&array)[N]) noexcept DELETED_FUNCTION;
} // namespace upx
+1 -1
View File
@@ -60,7 +60,7 @@
#if defined(__CYGWIN__) && defined(_WIN32)
#error "unexpected _WIN32"
#undef _WIN32
// #undef _WIN32
#endif
#if defined(__CYGWIN__) && defined(_WIN64)
// #error "unexpected _WIN64"