diff options
| author | gingerBill <gingerBill@users.noreply.github.com> | 2025-08-08 10:00:11 +0100 |
|---|---|---|
| committer | gingerBill <gingerBill@users.noreply.github.com> | 2025-08-08 10:00:11 +0100 |
| commit | e4a0228a8030f1d8d8793464be9ea7f8ae889941 (patch) | |
| tree | 27c4a59077abdba2dfe6e9b21bac0adb171593fb /src/build_settings.cpp | |
| parent | 3194fda8f3b01affc086eec4102d924277fe9f43 (diff) | |
Define the behaviour of integer division by zero
Diffstat (limited to 'src/build_settings.cpp')
| -rw-r--r-- | src/build_settings.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp index 40bbe41e5..c2a56d1bb 100644 --- a/src/build_settings.cpp +++ b/src/build_settings.cpp @@ -404,6 +404,11 @@ String linker_choices[Linker_COUNT] = { str_lit("radlink"), }; +enum IntegerDivisionByZeroKind : u8 { + IntegerDivisionByZero_Trap, + IntegerDivisionByZero_Zero, +}; + // This stores the information for the specify architecture of this build struct BuildContext { // Constants @@ -485,6 +490,8 @@ struct BuildContext { bool keep_object_files; bool disallow_do; + IntegerDivisionByZeroKind integer_division_by_zero_behaviour; + LinkerChoice linker_choice; StringSet custom_attributes; |