summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-03-15 21:03:09 -0700
committerRosen Penev <rosenp@gmail.com>2020-03-16 00:08:18 -0700
commit591f51f3d3becf0ff940516010d406bbeec94cf2 (patch)
treeead4ad5d4deaaec36c82bcd7dd42575d0e44f83a /src/util
parentb5d1a0901022d4711973740edadd87ce5913ac68 (diff)
replace noreturn attribute with standard C++ version
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/util')
-rw-r--r--src/util/Alloc.cxx2
-rw-r--r--src/util/Compiler.h2
-rw-r--r--src/util/Exception.hxx4
3 files changed, 3 insertions, 5 deletions
diff --git a/src/util/Alloc.cxx b/src/util/Alloc.cxx
index de62051f8..c610a68df 100644
--- a/src/util/Alloc.cxx
+++ b/src/util/Alloc.cxx
@@ -25,7 +25,7 @@
#include <string.h>
#include <unistd.h>
-gcc_noreturn
+[[noreturn]]
static void
oom()
{
diff --git a/src/util/Compiler.h b/src/util/Compiler.h
index 899851cad..6371fc20f 100644
--- a/src/util/Compiler.h
+++ b/src/util/Compiler.h
@@ -71,7 +71,6 @@
#define gcc_deprecated __attribute__((deprecated))
#define gcc_may_alias __attribute__((may_alias))
#define gcc_malloc __attribute__((malloc))
-#define gcc_noreturn __attribute__((noreturn))
#define gcc_packed __attribute__((packed))
#define gcc_printf(a,b) __attribute__((format(printf, a, b)))
#define gcc_pure __attribute__((pure))
@@ -101,7 +100,6 @@
#define gcc_deprecated
#define gcc_may_alias
#define gcc_malloc
-#define gcc_noreturn
#define gcc_packed
#define gcc_printf(a,b)
#define gcc_pure
diff --git a/src/util/Exception.hxx b/src/util/Exception.hxx
index 9f5bb4952..6aa94f153 100644
--- a/src/util/Exception.hxx
+++ b/src/util/Exception.hxx
@@ -42,14 +42,14 @@
* the std::exception_ptr itself.
*/
template<typename T>
-gcc_noreturn
+[[noreturn]]
inline void
ThrowException(T &&t)
{
throw std::forward<T>(t);
}
-gcc_noreturn
+[[noreturn]]
inline void
ThrowException(std::exception_ptr ep)
{