mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-19 22:10:19 +02:00
use compiler extension instead of C11 noreturn
C11 noreturn isn't available in C++.
This commit is contained in:
parent
7106bff27f
commit
d8817417cc
2 changed files with 3 additions and 3 deletions
2
new.cc
2
new.cc
|
@ -1,8 +1,6 @@
|
|||
#include <bits/functexcept.h>
|
||||
#include <new>
|
||||
|
||||
#define noreturn
|
||||
|
||||
#include "h_malloc.h"
|
||||
#include "util.h"
|
||||
|
||||
|
|
4
util.h
4
util.h
|
@ -2,7 +2,9 @@
|
|||
#define UTIL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdnoreturn.h>
|
||||
|
||||
// C11 noreturn doesn't work in C++
|
||||
#define noreturn __attribute__((noreturn))
|
||||
|
||||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue