Disable warnings in string/tester.c at top level
Florian Weimer
fweimer@redhat.com
Wed Oct 2 17:02:00 GMT 2019
* 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
More information about the Libc-alpha
mailing list