https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82134
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I don't argue that returning empty structures can be sometimes useful. But I fail to understand why would you want to use warn_unused_result attribute on such functions, that just makes no sense, because there is no harm if the empty struct is not copied to a temporary.