https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94312
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|missing -Wreturn-local-addr |missing -Wreturn-local-addr
|on returning local address |on returning local address
|via memchr |via memchr or memset
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Ditto for memset and strpbrk. The warning should be reviewed for coverage.
Rather than handling just built-ins a more general and more broadly usable
solution is to add a new function attribute to specify that a function returns
either the same value as one of its arguments (unchanged, such as memset), or a
pointer into the same array as one of its arguments (such as memchr).