Skip to content

Conversation

@LT2H
Copy link
Contributor

@LT2H LT2H commented Jun 10, 2025

Checks for modulo and modulo-assignment by zero at runtime. Based on a suggestion in #1399.
Resolves #1399.

@LT2H LT2H force-pushed the modulo-by-zero-check branch from b391976 to f9442fe Compare August 12, 2025 06:18
One of the tests now hits an MSVC error I've seen before, related to using std::source_location via module std import -- it doesn't manifest on any other compiler, or in MSVC using std headers. So the error is spurious, but I'm not able to debug it or find a workaround, and I don't want to record regression test failures just because of that use case where 'module std currently doesn't work.' So this commit also changes all -pure regression tests to use headers, not modules, at least for now until modules work better
@hsutter
Copy link
Owner

hsutter commented Jan 5, 2026

Thanks!

@hsutter hsutter merged commit 71a17ed into hsutter:main Jan 5, 2026
14 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SUGGESTION] Add runtime checks for C++ integer modulo by zero

2 participants