mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Change unreachable code to error. Remove unreachable where the compiler now can detect reachability.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user