Issue |
127139
|
Summary |
[libc] -Winteger-overflow in scalblnl_test.cpp
|
Labels |
libc
|
Assignees |
|
Reporter |
nickdesaulniers
|
```
In file included from /android0/llvm-project/libc/test/src/math/smoke/scalblnl_test.cpp:9:
In file included from /android0/llvm-project/libc/test/src/math/smoke/ScalbnTest.h:12:
/android0/llvm-project/libc/test/src/math/smoke/LdExpTest.h:53:63: warning: overflow in _expression_; result is -2'147'483'648 with type 'long' [-Winteger-overflow]
53 | long long_exp_array[4] = {LONG_MIN, INT_MIN - 1L, INT_MAX + 1L, LONG_MAX};
| ~~~~~~~~^~~~
/android0/llvm-project/libc/test/src/math/smoke/LdExpTest.h:53:49: warning: overflow in _expression_; result is 2'147'483'647 with type 'long' [-Winteger-overflow]
53 | long long_exp_array[4] = {LONG_MIN, INT_MIN - 1L, INT_MAX + 1L, LONG_MAX};
| ~~~~~~~~^~~~
/android0/llvm-project/libc/test/src/math/smoke/LdExpTest.h:53:63: warning: overflow in _expression_; result is -2'147'483'648 with type 'long' [-Winteger-overflow]
53 | long long_exp_array[4] = {LONG_MIN, INT_MIN - 1L, INT_MAX + 1L, LONG_MAX};
| ~~~~~~~~^~~~
/android0/llvm-project/libc/test/src/math/smoke/LdExpTest.h:53:49: warning: overflow in _expression_; result is 2'147'483'647 with type 'long' [-Winteger-overflow]
53 | long long_exp_array[4] = {LONG_MIN, INT_MIN - 1L, INT_MAX + 1L, LONG_MAX};
| ~~~~~~~~^~~~
```
This is with
`cmake ../runtimes -G Ninja -DLLVM_ENABLE_LLD=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libc" -DLIBC_TARGET_TRIPLE=i386-linux-gnu -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++`
i386 is ILP32 so `sizeof(int) == sizeof(long)`.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs