mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix division-by-zero checks on a /= 0 and b /= 0f #2558.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
- `Foo.is_eq` would return false if the type was a `typedef` and had an overload, but the underlying type was not comparable.
|
||||
- Remove division-by-zero checks for floating point in safe mode #2556.
|
||||
- Fix division-by-zero checks on `a /= 0` and `b /= 0f` #2558.
|
||||
- Fix fmod `a %= 0f`.
|
||||
|
||||
### Stdlib changes
|
||||
|
||||
|
||||
@@ -7166,6 +7166,7 @@ static bool sema_expr_analyse_op_assign(SemaContext *context, Expr *expr, Expr *
|
||||
{
|
||||
case BINARYOP_MULT_ASSIGN:
|
||||
case BINARYOP_DIV_ASSIGN:
|
||||
case BINARYOP_MOD_ASSIGN:
|
||||
break;
|
||||
case BINARYOP_BIT_AND_ASSIGN:
|
||||
case BINARYOP_BIT_OR_ASSIGN:
|
||||
@@ -7177,9 +7178,6 @@ static bool sema_expr_analyse_op_assign(SemaContext *context, Expr *expr, Expr *
|
||||
case BINARYOP_SUB_ASSIGN:
|
||||
is_add_sub = true;
|
||||
break;
|
||||
case BINARYOP_MOD_ASSIGN:
|
||||
int_only = true;
|
||||
break;
|
||||
case BINARYOP_SHL_ASSIGN:
|
||||
case BINARYOP_SHR_ASSIGN:
|
||||
is_shift = true;
|
||||
|
||||
Reference in New Issue
Block a user