[clang] [Clang] Add -fwrapv-pointer flag (PR #122486)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Fri Jan 24 08:45:20 PST 2025
================
@@ -57,15 +57,6 @@ void test1(void) {
// TRAPV_HANDLER: foo(
--a;
- // -fwrapv should turn off inbounds for GEP's, PR9256
- extern int* P;
- ++P;
- // DEFAULT: getelementptr inbounds nuw i32, ptr
- // WRAPV: getelementptr i32, ptr
- // TRAPV: getelementptr inbounds nuw i32, ptr
- // CATCH_UB_POINTER: getelementptr inbounds nuw i32, ptr
- // NOCATCH_UB_POINTER: getelementptr i32, ptr
----------------
nikic wrote:
I've restored the test. The intent here was to split off the pointer case into pointer-overflow.c, but there's no reason we can't have both...
https://github.com/llvm/llvm-project/pull/122486
More information about the cfe-commits
mailing list