https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101682
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Paul Eggert from comment #2) > Clang's warnings are not a problem here, because in clang 12.0.0 (the > current release) __has_c_attribute(nodiscard) is false, so code like this > works: I was testing the trunk clang git commit ef8c6849a235e97b8b981e0f998d430fdbd7bc2a not the release.