diff --git a/headers/private/kernel/util/kernel_cpp.h b/headers/private/kernel/util/kernel_cpp.h index 0b493c4ab9..d904b16154 100644 --- a/headers/private/kernel/util/kernel_cpp.h +++ b/headers/private/kernel/util/kernel_cpp.h @@ -22,7 +22,6 @@ extern const nothrow_t std::nothrow; typedef struct {} mynothrow_t; extern const mynothrow_t mynothrow; -#ifndef __clang__ #if __cplusplus >= 201402L #define _THROW(x) #define _NOEXCEPT noexcept @@ -38,7 +37,6 @@ extern void* operator new(size_t size, const mynothrow_t &) _NOEXCEPT; extern void* operator new[](size_t size, const mynothrow_t &) _NOEXCEPT; extern void operator delete(void *ptr) _NOEXCEPT; extern void operator delete[](void *ptr) _NOEXCEPT; -#endif #if __cplusplus >= 201402L diff --git a/src/system/kernel/arch/x86/64/descriptors.cpp b/src/system/kernel/arch/x86/64/descriptors.cpp index 3e516f0134..fd5d6ce68f 100644 --- a/src/system/kernel/arch/x86/64/descriptors.cpp +++ b/src/system/kernel/arch/x86/64/descriptors.cpp @@ -117,7 +117,7 @@ public: unsigned ist, bool kernelOnly); constexpr InterruptDescriptor(uintptr_t isr); - static constexpr InterruptDescriptor Generate(unsigned index); + static InterruptDescriptor Generate(unsigned index); private: uint16_t fBase0; @@ -331,7 +331,7 @@ InterruptDescriptorTable::Load() const } -constexpr InterruptDescriptor +InterruptDescriptor InterruptDescriptor::Generate(unsigned index) { return index == 3 diff --git a/src/system/kernel/util/kernel_cpp.cpp b/src/system/kernel/util/kernel_cpp.cpp index 4a55f693b7..10a5261ac0 100644 --- a/src/system/kernel/util/kernel_cpp.cpp +++ b/src/system/kernel/util/kernel_cpp.cpp @@ -31,7 +31,7 @@ // ... it doesn't seem to work with this symbol at least. #ifndef USING_LIBGCC -# if __GNUC__ >= 6 +# if __GNUC__ >= 6 || defined(__clang__) const std::nothrow_t std::nothrow = std::nothrow_t{ }; # elif __GNUC__ >= 3 const std::nothrow_t std::nothrow = {};