# **[](https://en.cppreference.com/w/c/header/stdckdint)** provides checked arithmetic macros (C23): `ckd_add`, `ckd_sub`, `ckd_mul`. They perform the operation and return `true` if overflow occurred, `false` otherwise, without triggering undefined behavior. Use these instead of manual overflow checks for cleaner, safer code. ## Example This example demonstrates overflow detection for addition and multiplication. ```c // compile: gcc -std=c2x -o stdckdintexample stdckdintexample.c // run: ./stdckdintexample // description: checked arithmetic detecting overflow #include #include #include int main() { int result; if (ckd_add(&result, INT_MAX, 1)) { printf("INT_MAX + 1 overflows\n"); } long product; if (ckd_mul(&product, 1000000L, 1000000L)) { printf("1000000 * 1000000 overflows long\n"); } else { printf("product = %ld\n", product); } return 0; } ```