Issue #287 (bdwgc).
Before this patch, clang 8 (and -std=c++1z) fails for gc_cpp.cc.
The error message produced is: ISO C++17 does not allow dynamic
exception specifications.
The "dynamic exception" syntax was declared deprecated in C++11 and
removed in C++17.
* gc_cpp.cc [!_MSC_VER && !__DMC__ && GC_NEW_DELETE_NEED_THROW
&& __cplusplus >= 201703L] (GC_DECL_NEW_THROW): Define to
noexcept(false); add comment.
# endif
# ifdef GC_NEW_DELETE_NEED_THROW
-# define GC_DECL_NEW_THROW throw(std::bad_alloc)
+# if __cplusplus < 201703L
+# define GC_DECL_NEW_THROW throw(std::bad_alloc)
+# else
+ // The "dynamic exception" syntax was deprecated in C++11
+ // and removed in C++17.
+# define GC_DECL_NEW_THROW noexcept(false)
+# endif
# else
# define GC_DECL_NEW_THROW /* empty */
# endif