Issue 123231
Summary Erroneous "use of infinity" warning
Labels clang:diagnostics
Assignees
Reporter ahatanak
    clang incorrectly emits a warning when a method called infinity is called.

$ cat test.cpp
```
double infinity() { return 0; }

int main() {
   return infinity();
}
```

$ clang++ -ffast-math test.cpp -c
test.cpp:4:11: warning: use of infinity is undefined behavior due to the currently enabled floating-point options [-Wnan-infinity-disabled]
    4 |    return infinity();
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to