https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

--- Comment #74 from Florian Weimer <fw at gcc dot gnu.org> ---
(In reply to Zdenek Sojka from comment #73)
> See MISRA C:2012 Rule 17.7:
> "...  If the return value of a function is intended not to be used
> explicitly, it should be cast to the void type. ..."
> 
> It would be helpful if gcc could be used to write MISRA-compliant code, or
> at least if it wouldn't generate compilation warnings when the programmer is
> targeting MISRA-compliancy.

Doesn't this (interpretation of MISRA) mean that compliant code cannot use
__attribute__((warn_unused_result))? That doesn't require any GCC changes.

Reply via email to