commit | 883b7fb0ccf1187bcb88851b00a327fb0c240af8 | [log] [tgz] |
---|---|---|
author | Aaron Green <aarongreen@google.com> | Thu Jan 25 21:50:28 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Jan 25 21:50:28 2024 +0000 |
tree | 46c0ce7d0bb1d1164cead45ac99bc13e13f19333 | |
parent | 44f2e8f6671c4c46fd35140ad0b4a3a4fa4d4d79 [diff] |
pw_preprocessor: Add integer-overflow macros This CL adds: * PW_ADD_OVERFLOW, which wraps __builtin_add_overflow, * PW_SUB_OVERFLOW, which wraps __builtin_sub_overflow, and * PW_MUL_OVERFLOW, which wraps __builtin_mul_overflow. It also adds checks in pw_assert to make use of these macros. Change-Id: I1c74711412b2602bf5af94c5d88fb35232d6da0b Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/187653 Commit-Queue: Aaron Green <aarongreen@google.com> Presubmit-Verified: CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Armando Montanez <amontanez@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.