This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Disable warnings in string/tester.c at top level


* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]