From: Nadav Har'El <n...@scylladb.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

gcc 7: do not use dynamic exception specifications

Dynamic exception specifications (throw(...) specification on functions)
were deprecated in C++11 so we shouldn't use them. Gcc 7 started complaining
about them, so it's about time we get rid of them.

Use the C++11 "noexcept" instead, where appropriate (instead of an empty
throw()).

Signed-off-by: Nadav Har'El <n...@scylladb.com>
Message-Id: <20170712151334.12673-5-...@scylladb.com>

---
diff --git a/include/osv/sched.hh b/include/osv/sched.hh
--- a/include/osv/sched.hh
+++ b/include/osv/sched.hh
@@ -1009,9 +1009,9 @@ void preempt_enable();
 class interruptible
 {
 public:
-    static void prepare(thread* target_thread) throw()
+    static void prepare(thread* target_thread) noexcept
         { target_thread->interrupted(false); }
-    static void check(thread* target_thread, wait_guard& wg) throw(int) {
+    static void check(thread* target_thread, wait_guard& wg) {
         if(target_thread->interrupted()) {
             wg.stop();
             throw int(EINTR);
@@ -1022,9 +1022,9 @@ public:
 class noninterruptible
 {
 public:
-    static void prepare(thread* target_thread) throw()
+    static void prepare(thread* target_thread) noexcept
         {}
-    static void check(thread* target_thread, wait_guard& wg) throw()
+    static void check(thread* target_thread, wait_guard& wg) noexcept
         {}
 };

--
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to