about summary refs log tree commit diff
path: root/ChangeLog
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2019-10-02 17:26:14 +0000
committerJoseph Myers <joseph@codesourcery.com>2019-10-02 17:26:14 +0000
commiteed005270a472fe97e0a93540387bb8c81a8e36b (patch)
tree6b7e7d4f6c95ee0a01f81786e346e2c49b30a5f2 /ChangeLog
parent4973abcba9453d54e8996a55c56ec004b669aa65 (diff)
downloadglibc-eed005270a472fe97e0a93540387bb8c81a8e36b.tar.gz
glibc-eed005270a472fe97e0a93540387bb8c81a8e36b.tar.xz
glibc-eed005270a472fe97e0a93540387bb8c81a8e36b.zip
Disable warnings in string/tester.c at top level.
string/tester.c contains code that correctly triggers various GCC
warnings about dubious uses of string functions (uses that are being
deliberately tested there), and duly disables those warnings around
the relevant code.

A change in GCC mainline resulted in this code failing to compile with
a -Warray-bounds error, despite the location with the error having
-Warray-bounds already disabled.  This has been reported as
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91890>.  This patch
avoids that problem and possible future issues with these diagnostics
by moving all the warning disabling in this file to top level, as
suggested by Florian in
<https://sourceware.org/ml/libc-alpha/2019-10/msg00033.html>, rather
than only doing it locally around specific function calls.

Tested with build-many-glibcs.py for aarch64-linux-gnu with GCC
mainline (with only the conform/ failures noted in
<https://sourceware.org/ml/libc-alpha/2019-10/msg00043.html>).

	* string/tester.c: Ignore -Warray-bounds and
	-Wmemset-transposed-args at top level.
	[__GNUC_PREREQ (7, 0)]: Ignore -Wrestrict and -Wstringop-overflow=
	at top level.
	[__GNUC_PREREQ (8, 0)]: Ignore -Wstringop-truncation at top level.
	(test_stpncpy): Do not ignore warnings here.
	(test_strncat): Likewise.
	(test_strncpy): Likewise.
	(test_memset): Likewise.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog12
1 files changed, 12 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index db769e3642..893c07cd81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2019-10-02  Joseph Myers  <joseph@codesourcery.com>
+
+	* string/tester.c: Ignore -Warray-bounds and
+	-Wmemset-transposed-args at top level.
+	[__GNUC_PREREQ (7, 0)]: Ignore -Wrestrict and -Wstringop-overflow=
+	at top level.
+	[__GNUC_PREREQ (8, 0)]: Ignore -Wstringop-truncation at top level.
+	(test_stpncpy): Do not ignore warnings here.
+	(test_strncat): Likewise.
+	(test_strncpy): Likewise.
+	(test_memset): Likewise.
+
 2019-10-02  Ɓukasz Majewski <lukma@denx.de>
 	* include/time.h: Add #include <bits/types/struct_timeval.h>