https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425
--- Comment #15 from Lucas De Marchi <lucas.de.marchi at gmail dot com> --- (In reply to Manuel López-Ibáñez from comment #14) > (In reply to Filipe Brandenburger from comment #12) > > Can I have this issue reopened please? > > If that makes you happy... > > > Ok, how can we assign this bug to the appropriate team then? > > It doesn't work like that. Individual contributors will work on things that > they find interesting or get paid to fix. Rusty, who opened this issue, seemed inclined to prepare such a patch. > > I can't really think of a situation in the Linux kernel source code where > > I'd find a __must_check function with a void cast, exactly for that reason, > > right now it would generate a warning. > > The users of _wur added _wur to a function expecting that any use of this > function that does not assign the result will get a warning, even if there > is a cast to void. Not warning for a cast to void breaks that expectation. As I said, the people who add the attribute may not be the same people who use the interface with that attribute. I myself when writing libraries use the _wur to give my users a warning if they are ignoring the return value. However they have all the rights to ignore it. Be it simply by not using -Wunused-result, hacking a macro to ignore the result or use the de facto standard to cast to void. IMO the latter is the best one since there might be 1 particular case in the entire codebase in which ignoring the return makes sense.