https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67795
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- I would guess the issue is that ?: returns an rvalue (but that may not be 100% correct if omitting the cast works and does not warn)