diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-08-08 10:50:24 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-08-08 10:50:24 +0100 |
| commit | 7b5cee9f1e6f6048d8689dbdf959409bd4073b3b (patch) | |
| tree | 46cf5e72c461e154ab993a1b1ba7fb3d77a464a3 /src | |
| parent | ee01643229cc015c35b3b1c237caa66a056bb9be (diff) | |
Correct #+feature check
Diffstat (limited to 'src')
| -rw-r--r-- | src/parser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index c63ffe747..a05e183ce 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -6446,8 +6446,8 @@ gb_internal u64 parse_feature_tag(Token token_for_pos, String s) { res = feature_flags &~ feature_not_flags; } - if ((res & OptInFeatureFlag_IntegerDivisionByZero_ALL) == - OptInFeatureFlag_IntegerDivisionByZero_ALL) { + u64 idbz_count = gb_count_set_bits(res & OptInFeatureFlag_IntegerDivisionByZero_ALL); + if (idbz_count > 1) { syntax_error(token_for_pos, "Only one integer-division-by-zero feature flag can be enabled"); } |