]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Revert part of 44ffe1193269
authorPierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Thu, 3 Apr 2025 15:27:46 +0000 (17:27 +0200)
committerArthur Cohen <arthur.cohen@embecosm.com>
Tue, 8 Apr 2025 08:17:16 +0000 (10:17 +0200)
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 a9e3bc2b2338e64319189c6f9a0a98fa0a018516..07ba8776214eabe6fed7fa4a0001d077c3792011 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