18 Commits
Author SHA1 Message Date
Kyle Edwards 8cf21478ac math(): Add INCREMENT and DECREMENT modes 2026-07-15 11:40:07 -04:00
Tyler Yankee 57444e1d3f math: Avoid FPE on INT_MIN by -1 2026-04-27 09:22:26 -04:00
Matthew Woehlke b0f9852990 Diagnostics: Update tests (automated)
Update expected test output to account for the new format of diagnostic
messages. These changes were applied entirely by `sed` using the
following commands:

  - `/Use -Wno-dev to suppress/s/-Wno-dev/-Wno-author/g`
  - `s/Warning [\\][(]dev[\\][)]/Warning \\(author\\)/g`
  - `s/CMake Deprecation Warning/CMake Warning \\(deprecated\\)/g`

This is not a complete fix, but covers a significant fraction of the
needed changes, and this commit is strictly automated changes.
2026-04-16 15:10:35 -04:00
Brad King 2423db545f math: Avoid signed integer overflow on negation
Extend commit 099c05dd04 (math: Avoid signed integer overflow when
intrinsics are available, 2026-02-26) to cover unary `-`.
2026-03-04 09:41:56 -05:00
Brad King 099c05dd04 math: Avoid signed integer overflow when intrinsics are available
The `math(EXPR)` command documents that results must fit in a 64-bit
signed integer.  When built with compilers that offer the relevant
intrinsics, detect overflow and issue warnings.
2026-02-28 07:03:51 -05:00
Tyler Yankee 4b0c458c09 LexerParser: Disallow modulo by zero 2026-02-03 13:35:59 -05:00
AJIOB 5de7a09e77 Tests/RunCMake: Match dots more precisely, part 3 2025-10-20 14:45:24 -04:00
AJIOB 62b112ee25 Tests/RunCMake: Match CMakeLists.txt file name more precisely 2025-10-16 17:42:12 +03:00
Brad King f4aa34daa7 Tests/RunCMake: Update cmake_minimum_required versions to 3.10
For policy-specific tests, use the version before the policy was
introduced.  Otherwise, use 3.10 where possible.
2024-10-03 11:52:22 -04:00
Brad King 1edf138506 Tests/RunCMake: Update cmake_minimum_required versions
For policy-specific tests, use the version before the policy was
introduced.  Otherwise, use 3.5 where possible.

Also, remove `cmake_minimum_required()` and `project()` calls from
individual cases where they are handled by `CMakeLists.txt`.
2023-02-11 06:24:22 -05:00
Christoph Grüninger 699d50e376 LexerParser: Regenerate parser files with GNU Bison 3.7.4
Adjust expected test output.
2021-01-25 12:06:17 -05:00
Brad King 9b99b4bfc8 Tests/RunCMake: Update cmake_minimum_required versions
Use 3.3 or 2.8.12 where possible.
2020-06-18 09:52:05 -04:00
Gabor Bencze d427f12b73 math(EXPR): Implement ~(exp_NOT) expression as documented
Fixes: #19252
2019-07-23 07:33:50 -04:00
Brad King 406f397e8b math: Restore toleration of unexpected characters in an expression
Prior to commit 7c4c13ffef (math: Reject unexpected expression input
explicitly, 2018-05-18) we ignored unexpected characters in an
expression that otherwise can be parsed.  In order to preserve
compatibility with projects that accidentally used this, convert the
error to a warning.
2018-07-16 14:46:43 -04:00
Daniel Franke 5dbee9d2d0 math: Add options to calculate and format output as hexadecimal 2018-07-03 09:55:58 -04:00
Daniel Franke 8661e7052c math: Diagnose divide-by-zero 2018-06-26 14:21:18 -04:00
Daniel Franke 7c4c13ffef math: Reject unexpected expression input explicitly
Switch to C++ exceptions for lexer/parser error handling.
Teach the lexer/parser to fail on unexpected input.
2018-06-26 14:15:21 -04:00
Daniel Franke 963b8d9f6c math: Add RunCMake.math test to prepare for error cases 2018-06-22 09:00:34 -04:00