This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug build/18432] make check fails for Werror=memset-transposed-args with gcc 4.9.2
- From: "andrew.bennett at imgtec dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 01 Sep 2015 14:48:28 +0000
- Subject: [Bug build/18432] make check fails for Werror=memset-transposed-args with gcc 4.9.2
- Auto-submitted: auto-generated
- References: <bug-18432-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18432
Andrew Bennett <andrew.bennett at imgtec dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |andrew.bennett at imgtec dot com
--- Comment #1 from Andrew Bennett <andrew.bennett at imgtec dot com> ---
Hi Simon,
I have also just found this issue on my Debian system. After a little bit of
digging I have found that the Debian GCC 4.9 compiler
(https://packages.debian.org/jessie/gcc-4.9) has back-ported the
-Wmemset-transposed-args patch
(https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=212510); look for
memset-transposed in
(http://http.debian.net/debian/pool/main/g/gcc-4.9/gcc-4.9_4.9.2-10.diff.gz).
This feature was only introduced in GCC 5.0 (the gcc-5_1_0-release tag to be
specific), which means the check in string/tester.c is correct:
#if __GNUC_PREREQ (5, 0)
/* GCC 5.0 warns about a zero-length memset because the arguments to memset
may be in the wrong order. But we really want to test this. */
DIAG_IGNORE_NEEDS_COMMENT (5.0, "-Wmemset-transposed-args")
#endif
One quick fix is to change __GNUC_PREREQ (5, 0) to __GNUC_PREREQ (4, 9) when
testing glibc and the test should pass.
Regards,
Andrew
--
You are receiving this mail because:
You are on the CC list for the bug.