| Issue |
130808
|
| Summary |
Conversion of inf to integer is not diagnosed
|
| Labels |
|
| Assignees |
|
| Reporter |
apolukhin
|
Consider the following example:
```cpp
int foo() {
return 1 / static_cast<double>(0);
}
```
With `-Wall -Wextra` there is no warning about an undefined behavior ([conv.fpint] p1 "The behavior is undefined if the truncated value cannot be represented in the destination type.")
Please add a warning
Godbolt playground: https://godbolt.org/z/cMYo6xPaY
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs