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

GNU C Library master sources branch master updated. glibc-2.26.9000-1005-g40c4162


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  40c4162df6766fb1e8ede875ca8df25d8075d3a5 (commit)
      from  5983df320af003a10ab2b965db1eecaca92c7056 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=40c4162df6766fb1e8ede875ca8df25d8075d3a5

commit 40c4162df6766fb1e8ede875ca8df25d8075d3a5
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Dec 18 22:55:28 2017 +0000

    Disable -Wrestrict for two nptl/tst-attr3.c tests.
    
    nptl/tst-attr3 fails to build with GCC mainline because of
    (deliberate) aliasing between the second (attributes) and fourth
    (argument to thread start routine) arguments to pthread_create.
    
    Although both those arguments are restrict-qualified in POSIX,
    pthread_create does not actually dereference its fourth argument; it's
    an opaque pointer passed to the thread start routine.  Thus, the
    aliasing is actually valid in this case, and it's deliberate in the
    test.  So this patch makes the test disable -Wrestrict for the two
    pthread_create calls in question.  (-Wrestrict was added in GCC 7,
    hence the __GNUC_PREREQ conditions, but the particular warning in
    question is new in GCC 8.)
    
    Tested compilation with build-many-glibcs.py for aarch64-linux-gnu.
    
    	* nptl/tst-attr3.c: Include <libc-diag.h>.
    	(do_test) [__GNUC_PREREQ (7, 0)]: Ignore -Wrestrict for two tests.

diff --git a/ChangeLog b/ChangeLog
index a444183..8ce5a11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2017-12-18  Joseph Myers  <joseph@codesourcery.com>
 
+	* nptl/tst-attr3.c: Include <libc-diag.h>.
+	(do_test) [__GNUC_PREREQ (7, 0)]: Ignore -Wrestrict for two tests.
+
 	* posix/tst-glob_symlinks.c (do_test): Increase size of buf.
 
 	* string/tester.c (test_strncat): Also disable -Warray-bounds
diff --git a/nptl/tst-attr3.c b/nptl/tst-attr3.c
index bc23386..420a7db 100644
--- a/nptl/tst-attr3.c
+++ b/nptl/tst-attr3.c
@@ -26,6 +26,7 @@
 #include <unistd.h>
 
 #include <stackinfo.h>
+#include <libc-diag.h>
 
 static void *
 tf (void *arg)
@@ -362,7 +363,16 @@ do_test (void)
       result = 1;
     }
 
+  DIAG_PUSH_NEEDS_COMMENT;
+#if __GNUC_PREREQ (7, 0)
+  /* GCC 8 warns about aliasing of the restrict-qualified arguments
+     passed &a.  Since pthread_create does not dereference its fourth
+     argument, this aliasing, which is deliberate in this test, cannot
+     in fact cause problems.  */
+  DIAG_IGNORE_NEEDS_COMMENT (8, "-Wrestrict");
+#endif
   err = pthread_create (&th, &a, tf, &a);
+  DIAG_POP_NEEDS_COMMENT;
   if (err)
     {
       error (0, err, "pthread_create #2 failed");
@@ -388,7 +398,16 @@ do_test (void)
       result = 1;
     }
 
+  DIAG_PUSH_NEEDS_COMMENT;
+#if __GNUC_PREREQ (7, 0)
+  /* GCC 8 warns about aliasing of the restrict-qualified arguments
+     passed &a.  Since pthread_create does not dereference its fourth
+     argument, this aliasing, which is deliberate in this test, cannot
+     in fact cause problems.  */
+  DIAG_IGNORE_NEEDS_COMMENT (8, "-Wrestrict");
+#endif
   err = pthread_create (&th, &a, tf, &a);
+  DIAG_POP_NEEDS_COMMENT;
   if (err)
     {
       error (0, err, "pthread_create #3 failed");

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |    3 +++
 nptl/tst-attr3.c |   19 +++++++++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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