[PATCH] add support for -Wmismatched-dealloc
Florian Weimer
fweimer@redhat.com
Mon Jan 25 10:56:54 GMT 2021
* Martin Sebor via Libc-alpha:
> diff --git a/libio/stdio.h b/libio/stdio.h
> index 144137cf67..62814c93db 100644
> --- a/libio/stdio.h
> +++ b/libio/stdio.h
> @@ -202,15 +214,9 @@ extern char *tmpnam_r (char *__s) __THROW __wur;
> P_tmpdir is tried and finally "/tmp". The storage for the filename
> is allocated by `malloc'. */
> extern char *tempnam (const char *__dir, const char *__pfx)
> - __THROW __attribute_malloc__ __wur;
> + __attribute_malloc__ __wur __attr_dealloc_free __THROW;
> #endif
This breaks boostrap because in some C++ modes, __THROW (aka noexcept)
needs to come before all attributes.
Further tests are ongoing; this is difficult to do due to general
toolchain breakage (although things have improved lately).
Thanks,
Florian
--
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill
More information about the Libc-alpha
mailing list