diff --git a/lib/std/io/os/getcwd.c3 b/lib/std/io/os/getcwd.c3 index ba737fca5..961ab4f46 100644 --- a/lib/std/io/os/getcwd.c3 +++ b/lib/std/io/os/getcwd.c3 @@ -35,7 +35,7 @@ macro String! getcwd(Allocator* using = mem::heap()) return res.copy(using); $default: - unreachable("'getcwd' not available"); + return IoError.UNSUPPORTED_OPERATION?; $endswitch } diff --git a/lib/std/math/math_nolibc/cos.c3 b/lib/std/math/math_nolibc/cos.c3 index 76e59393c..7fefa946f 100644 --- a/lib/std/math/math_nolibc/cos.c3 +++ b/lib/std/math/math_nolibc/cos.c3 @@ -37,7 +37,6 @@ fn float _cosf(float x) @extern("cosf") @weak @nostrip case 2: return -__cosdf(y); default: return __sindf(y); } - unreachable(); } /* origin: FreeBSD /usr/src/lib/msun/src/s_cos.c */ diff --git a/lib/std/math/math_nolibc/sin.c3 b/lib/std/math/math_nolibc/sin.c3 index 6e7dc8f69..d895ca696 100644 --- a/lib/std/math/math_nolibc/sin.c3 +++ b/lib/std/math/math_nolibc/sin.c3 @@ -70,7 +70,6 @@ fn float _sinf(float x) @weak @extern("sinf") @nostrip case 2: return __sindf(-y); default: return -__cosdf(y); } - unreachable(); } /* origin: FreeBSD /usr/src/lib/msun/src/s_sin.c */