1.31 -fwrapv

Instructs the compiler to assume that signed arithmetic overflow of addition, subtraction, and multiplication, wraps using two's-complement representation.

Note:

When both -fwrapv and -ftrapv are used in a single command, the furthest-right option overrides the other.

For example, here -fwrapv overrides -ftrapv:

armclang --target=aarch64-arm-none-eabi -ftrapv -c -fwrapv hello.c
Non-ConfidentialPDF file icon PDF versionDUI0774J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.