This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Disable warnings in string/tester.c at top level
- From: Florian Weimer <fweimer at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Wed, 02 Oct 2019 19:02:44 +0200
- Subject: Re: Disable warnings in string/tester.c at top level
- References: <alpine.DEB.2.21.1910021652380.28156@digraph.polyomino.org.uk>
* Joseph Myers:
> diff --git a/string/tester.c b/string/tester.c
> index 24b0dad1cb..128d2c7731 100644
> --- a/string/tester.c
> +++ b/string/tester.c
> @@ -34,6 +34,20 @@
> #include <fcntl.h>
> #include <libc-diag.h>
>
> +/* This file tests a range of corner cases of string functions,
> + including cases where truncation occurs or where sizes specified
> + are larger than the actual buffers, which result in various
> + warnings. */
> +DIAG_IGNORE_NEEDS_COMMENT (8, "-Warray-bounds");
> +DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args");
> +#if __GNUC_PREREQ (7, 0)
> +DIAG_IGNORE_NEEDS_COMMENT (9, "-Wrestrict");
> +DIAG_IGNORE_NEEDS_COMMENT (7, "-Wstringop-overflow=");
> +#endif
> +#if __GNUC_PREREQ (8, 0)
> +DIAG_IGNORE_NEEDS_COMMENT (8, "-Wstringop-truncation");
> +#endif
> +
Should this come before the #include directives, in case the headers
contain inline functions?
Thanks,
Florian