kernel: Small fixes for Clang.

This commit is contained in:
Augustin Cavalier
2018-06-18 19:32:13 -04:00
parent 29a21a63cb
commit 9ac3062734
3 changed files with 3 additions and 5 deletions
-2
View File
@@ -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
+1 -1
View File
@@ -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 = {};