diff options
author | Joseph Myers <joseph@codesourcery.com> | 2019-10-02 17:26:14 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2019-10-02 17:26:14 +0000 |
commit | eed005270a472fe97e0a93540387bb8c81a8e36b (patch) | |
tree | 6b7e7d4f6c95ee0a01f81786e346e2c49b30a5f2 /sysdeps | |
parent | 4973abcba9453d54e8996a55c56ec004b669aa65 (diff) | |
download | glibc-eed005270a472fe97e0a93540387bb8c81a8e36b.tar glibc-eed005270a472fe97e0a93540387bb8c81a8e36b.tar.gz glibc-eed005270a472fe97e0a93540387bb8c81a8e36b.tar.bz2 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 'sysdeps')
0 files changed, 0 insertions, 0 deletions