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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
As described in the manual, sincve GCC 13.1 -fexcess-precision=standard is
enabled by -std=c++NN (but not by -std=gnu++NN).

This means the literal 2.2 is represented with excess precision, and so is not
equal to the same value converted to double.

You can use (a == (double)2.2) to make the comparison work.

Reply via email to