https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I've created the table just by walking through the 'D' handling. That said, looking e.g. at https://people.eecs.berkeley.edu/~wkahan/ieee754status/IEEE754.PDF for the C comparisons (EQ, NE, LT, LE, GT, GE) EQ and NE should not raise FE_INVALID, while LT, LE, GT, GE should. And, if one or both operands are NaNs, then NE must be true, while EQ, LT, LE, GT, GE false. So, at least for these, the 'D' numbers in the table are right, i.e. EQ 0, NE 4, GT 0xe, GE 0xd, LT 1, LE 2. Let me investigate the other comparison codes.