aboutsummaryrefslogtreecommitdiff
path: root/string/tester.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/tester.c')
-rw-r--r--string/tester.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/string/tester.c b/string/tester.c
index 47f6aeb..33a77d5 100644
--- a/string/tester.c
+++ b/string/tester.c
@@ -1,5 +1,5 @@
/* Tester for string functions.
- Copyright (C) 1995-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,12 +50,23 @@ DIAG_IGNORE_NEEDS_COMMENT (11, "-Wstringop-overread");
#include <strings.h>
#include <fcntl.h>
+static __typeof (bzero) * volatile bzero_indirect = bzero;
+static __typeof (memset) * volatile memset_indirect = memset;
+
+#undef bzero
+#undef memset
+
+#define bzero bzero_indirect
+#define memset memset_indirect
+
/* 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");
+#if __GNUC_PREREQ (5, 0)
DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args");
+#endif
#if __GNUC_PREREQ (7, 0)
DIAG_IGNORE_NEEDS_COMMENT (9, "-Wrestrict");
DIAG_IGNORE_NEEDS_COMMENT (7, "-Wstringop-overflow=");