Add [[noreturn]] attributes to fix warning
authorJonathan Wakely <jwakely@redhat.com>
Fri, 1 Dec 2017 15:10:13 +0000 (15:10 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 1 Dec 2017 15:10:13 +0000 (15:10 +0000)
* libsupc++/nested_exception.h (__throw_with_nested_impl): Add
noreturn attribute.

From-SVN: r255315

libstdc++-v3/ChangeLog
libstdc++-v3/libsupc++/nested_exception.h

index 1f138d7f1f5e89237bc26bafe3398769b4741fbe..4de8cc731b6fbe9a929e44c8e906ac8e65d6dc2e 100644 (file)
@@ -1,5 +1,8 @@
 2017-12-01  Jonathan Wakely  <jwakely@redhat.com>
 
+       * libsupc++/nested_exception.h (__throw_with_nested_impl): Add
+       noreturn attribute.
+
        * include/bits/regex_executor.tcc (_Executor::_M_rep_once_more):
        Remove semi-colon after function body.
        * include/bits/uniform_int_dist.h (_Power_of_2): Likewise.
index 43970b4ef860d5b90595046e56a65d728fd0bc52..27bccfce35f243a837fd996eca767d692fddf08c 100644 (file)
@@ -92,6 +92,7 @@ namespace std
   // Throw an exception of unspecified type that is publicly derived from
   // both remove_reference_t<_Tp> and nested_exception.
   template<typename _Tp>
+    [[noreturn]]
     inline void
     __throw_with_nested_impl(_Tp&& __t, true_type)
     {
@@ -100,6 +101,7 @@ namespace std
     }
 
   template<typename _Tp>
+    [[noreturn]]
     inline void
     __throw_with_nested_impl(_Tp&& __t, false_type)
     { throw std::forward<_Tp>(__t); }