]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert part of 44ffe1193269
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 3 Apr 2025 15:27:46 +0000 (17:27 +0200)
committerP-E-P <32375388+P-E-P@users.noreply.github.com>
Mon, 7 Apr 2025 08:18:19 +0000 (08:18 +0000)
This commit got rid of msvc specific code and remove the else clause,
this triggered warning with tl::expected::value function.

gcc/rust/ChangeLog:

* util/expected.h: Use gcc_unreachable within gcc context.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
gcc/rust/util/expected.h

index a7ddd55a88d93a53b55068793c3f0aad50db1fe5..6f5ef1c8754b134c815e89c65b8c5e7a0887c999 100644 (file)
@@ -212,10 +212,8 @@ template <typename E>
   throw std::forward<E>(e);
 #else
   (void)e;
-#ifdef _MSC_VER
   gcc_unreachable();
 #endif
-#endif
 }
 
 #ifndef TL_TRAITS_MUTEX
@@ -2437,4 +2435,4 @@ void swap(expected<T, E> &lhs,
 }
 } // namespace tl
 
-#endif
\ No newline at end of file
+#endif