mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Make unreachable() only panic in safe mode.
This commit is contained in:
@@ -204,8 +204,9 @@ macro void unreachable(String string = "Unreachable statement reached.", ...) @b
|
||||
{
|
||||
$if env::COMPILER_SAFE_MODE:
|
||||
panicf(string, $$FILE, $$FUNC, $$LINE, $vasplat);
|
||||
$endif;
|
||||
$else
|
||||
$$unreachable();
|
||||
$endif
|
||||
}
|
||||
|
||||
<*
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
- Fixes to `@format` checking #2199.
|
||||
- Distinct versions of builtin types ignore @operator overloads #2204.
|
||||
- @operator macro using untyped parameter causes compiler segfault #2200.
|
||||
- Make `unreachable()` only panic in safe mode.
|
||||
|
||||
### Stdlib changes
|
||||
- Deprecate `String.is_zstr` and `String.quick_zstr` #2188.
|
||||
|
||||
Reference in New Issue
Block a user