kernel: Small fixes for Clang.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user