================
@@ -1964,6 +1964,53 @@ namespace I128Mul {
}
#endif
+namespace OverflowOps {
+ constexpr bool add_bool() {
+ bool r = false;
+ return __builtin_add_overflow(1u, 1u, &r) && r == false;
----------------
shafik wrote:
I am curious what we expect for:
```cpp
constexpr bool add_bool() {
bool r = false;
return __builtin_add_overflow(true, true, &r) && r == false;
}
static_assert(add_bool());
```
I would also note gcc does not seem to like the third argument:
https://gcc.godbolt.org/z/nT56hx935
https://github.com/llvm/llvm-project/pull/192568
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits