https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68039
--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Since op1 and op2 in that COND_EXPR are the same, we fold the conditional expression to a COMPOUND_EXPR: return x ();, 0; so the result of x () looks unused. Same for C++.