https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111808

Aaron Ballman <aaron at aaronballman dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aaron at aaronballman dot com

--- Comment #10 from Aaron Ballman <aaron at aaronballman dot com> ---
GCC also rejects even when excess precision shouldn't be materially involved:
https://godbolt.org/z/neovGbane
```
constexpr int i = (int)(1.0f + 0.0f);
```
is rejected, but remove the `+ 0.0f` and it's accepted. I think it may be
related to the excess precision checking because a single literal is accepted
but if any math operators get involved, it's rejected. e.g., `constexpr int i =
(int)-1.0f;`

Reply via email to