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.27.9000-43-gce99922


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  ce999220903ae5ad027a2a7df722acaf2cecf4bf (commit)
      from  b7c83ca30ef8e85b6642151d95600a36535f8d97 (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=ce999220903ae5ad027a2a7df722acaf2cecf4bf

commit ce999220903ae5ad027a2a7df722acaf2cecf4bf
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Feb 7 13:36:14 2018 +0000

    Fix -Os strcoll, wcscoll, build (bug 21313).
    
    The findidx functions used in implementing strcoll / wcscoll already
    use DIAG_IGNORE_Os_NEEDS_COMMENT for spurious -Wmaybe-uninitialized
    warnings that appear with -Os.  In building with GCC 7 for x86_64 with
    -Os, I find there are additional such warnings, for the same structure
    elements, which are spurious for the same reasons given in the
    existing comments (and this was also reported for MIPS with GCC 5 in
    bug 21313).  This patch adds corresponding uses of DIAG_* in the
    places that get the additional warnings.
    
    Tested for x86_64 with -Os that this eliminates those warnings and so
    allows the build to progress further.
    
    	[BZ #21313]
    	* locale/weight.h (findidx): Disable -Wmaybe-uninitialized for -Os
    	in another place.
    	* locale/weightwc.h (findidx): Likewise.

diff --git a/ChangeLog b/ChangeLog
index d823e3a..7ff1ffb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2018-02-07  Joseph Myers  <joseph@codesourcery.com>
+
+	[BZ #21313]
+	* locale/weight.h (findidx): Disable -Wmaybe-uninitialized for -Os
+	in another place.
+	* locale/weightwc.h (findidx): Likewise.
+
 2018-02-07  Wilco Dijkstra  <wdijkstr@arm.com>
 
 	* manual/probes.texi (slowlog): Delete documentation of removed probe.
diff --git a/locale/weight.h b/locale/weight.h
index e2fdae1..6028d35 100644
--- a/locale/weight.h
+++ b/locale/weight.h
@@ -132,7 +132,15 @@ findidx (const int32_t *table,
 	      do
 		{
 		  offset <<= 8;
+		  /* With GCC 7 when compiling with -Os the compiler
+		     warns that seq1.back_us and seq2.back_us, which
+		     become usrc, might be used uninitialized.  This
+		     is impossible for the same reason as described
+		     above.  */
+		  DIAG_PUSH_NEEDS_COMMENT;
+		  DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized");
 		  offset += usrc[cnt] - cp[cnt];
+		  DIAG_POP_NEEDS_COMMENT;
 		}
 	      while (++cnt < nhere);
 	    }
diff --git a/locale/weightwc.h b/locale/weightwc.h
index 682d2b4..ac25ba9 100644
--- a/locale/weightwc.h
+++ b/locale/weightwc.h
@@ -90,9 +90,16 @@ findidx (const int32_t *table,
 	  size_t cnt;
 	  size_t offset;
 
+	  /* With GCC 7 when compiling with -Os the compiler warns
+	     that seq1.back_us and seq2.back_us, which become usrc,
+	     might be used uninitialized.  This is impossible for the
+	     same reason as described above.  */
+	  DIAG_PUSH_NEEDS_COMMENT;
+	  DIAG_IGNORE_Os_NEEDS_COMMENT (7, "-Wmaybe-uninitialized");
 	  for (cnt = 0; cnt < nhere - 1 && cnt < len; ++cnt)
 	    if (cp[cnt] != usrc[cnt])
 	      break;
+	  DIAG_POP_NEEDS_COMMENT;
 
 	  if (cnt < nhere - 1)
 	    {

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

Summary of changes:
 ChangeLog         |    7 +++++++
 locale/weight.h   |    8 ++++++++
 locale/weightwc.h |    7 +++++++
 3 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]