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-801-ga3aaa59


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  a3aaa59816881c909249b68881e788152d753345 (commit)
      from  8beba15d536aa5c89e9e55e4c497c0bcd10cb67c (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=a3aaa59816881c909249b68881e788152d753345

commit a3aaa59816881c909249b68881e788152d753345
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Tue Nov 21 09:44:42 2017 -0200

    nptl: Add workaround for ASSERT_PTHREAD_INTERNAL_SIZE with GCC 4.9
    
    GCC 4.9 (the minimum current supported) emits an warning for universal
    zero initializer ({0}) on ASSERT_PTHREAD_INTERNAL_SIZE:
    
    pthread_attr_init.c: In function â??__pthread_attr_init_2_1â??:
    pthread_attr_init.c:37:3: error: missing braces around initializer [-Werror=missing-braces]
       ASSERT_PTHREAD_INTERNAL_SIZE (pthread_attr_t, struct pthread_attr);
       ^
    pthread_attr_init.c:37:3: error: (near initialization for â??(anonymous).__sizeâ??) [-Werror=missing-braces]
    
    It is fact GCC BZ#53119 [1] fixed in later version (GCC5+).  Since
    current branch is closed and there is no indication it will be backports
    (comment #20 in same bug report) this patch fixes by using a double
    bracket to zero initialize the struct.
    
    Checked on x86_64-linux-gnu with GCC 7 and GCC 4.9.
    
    	* nptl/pthreadP.h (ASSERT_PTHREAD_INTERNAL_SIZE): Add workarond for
    	-Wmissing-braces on GCC 4.9.
    
    [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53119
    
    Signed-off-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

diff --git a/ChangeLog b/ChangeLog
index f9e2e18..c72be0c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-11-21  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* nptl/pthreadP.h (ASSERT_PTHREAD_INTERNAL_SIZE): Add workarond for
+	-Wmissing-braces on GCC 4.9.
+
 2017-11-21  Stefan Liebler  <stli@linux.vnet.ibm.com>
 
 	* sysdeps/s390/s390-64/start.S (_start): Add cfi information for r14.
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 1cc80b6..713000e 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -644,7 +644,7 @@ check_stacksize_attr (size_t st)
 		  "sizeof (" #type ") != " #size)
 
 #define ASSERT_PTHREAD_INTERNAL_SIZE(type, internal) 			\
-  _Static_assert (sizeof ((type) { 0 }).__size >= sizeof (internal), 	\
+  _Static_assert (sizeof ((type) { { 0 } }).__size >= sizeof (internal),\
 		  "sizeof (" #type ".__size) < sizeof (" #internal ")")
 
 #define ASSERT_PTHREAD_STRING(x) __STRING (x)

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

Summary of changes:
 ChangeLog       |    5 +++++
 nptl/pthreadP.h |    2 +-
 2 files changed, 6 insertions(+), 1 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]