https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115986
--- Comment #3 from Valentin Tolmer <valentin at tolmer dot fr> --- Some notes: - The fact that the static_assert fails is not relevant. Changing b() to return 1 still exhibits the error. - The branch taken in `long f = true ? 0 : b(long(1));` matters; it only fails if b is not evaluated. - The specific template arguments of b don't matter, as long as we have 2 different instantiations (one of them not actually called due to the branch above). - if the `0_c`, or an expression containing it, is assigned to a variable, it doesn't fail. However, simply using the value (e.g. `(void)b(0_c);`) still exhibits the bug.