This is the mail archive of the glibc-bugs@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]

[Bug build/18432] make check fails for Werror=memset-transposed-args with gcc 4.9.2


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.


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