[Bug c++/110476] constexpr floating point regression with -std=c++XX

2023-06-29 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110476 --- Comment #3 from Jonathan Wakely --- I think the justification for GCC's behaviour is that "representable value" is to be interpreted in the context of FLT_EVAL_METHOD, so it means representable as double (for FLT_EVAL_METHOD==1) or long doub

[Bug c++/110476] constexpr floating point regression with -std=c++XX

2023-06-29 Thread pdimov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110476 --- Comment #2 from Peter Dimov --- Discussion of FLT_EVAL_METHOD notwithstanding, I think that this behavior is not allowed by https://eel.is/c++draft/lex.fcon#3. "If the scaled value is not in the range of representable values for its type, t

[Bug c++/110476] constexpr floating point regression with -std=c++XX

2023-06-29 Thread pdimov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110476 --- Comment #1 from Peter Dimov --- As discussed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108742, this is a consequence of applying the FLT_EVAL_METHOD=2 rules, and can be fixed by casting 3.14f to (float). That's... incredibly surprisin