commited: avoid extended initializer lists warnings

Martin Sebor msebor@gmail.com
Thu Jul 19 22:15:00 GMT 2018


I've checked in the patch below as r262892 to avoid the many
warnings the new code was causing with GCC 6:

/ssd/src/gcc/svn/gcc/align.h:53:32: warning: extended initializer lists 
only available with -std=c++11 or -std=gnu++11

Martin

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 262891)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2018-07-19  Martin Sebor  <msebor@redhat.com>
+
+	* align.h (align_flags): Use member initialization.
+
  2018-07-19  David Malcolm  <dmalcolm@redhat.com>

  	* Makefile.in (OBJS): Add optinfo.o.
Index: gcc/align.h
===================================================================
--- gcc/align.h	(revision 262891)
+++ gcc/align.h	(working copy)
@@ -50,8 +50,10 @@ struct align_flags
    /* Default constructor.  */
    align_flags (int log0 = 0, int maxskip0 = 0, int log1 = 0, int 
maxskip1 = 0)
    {
-    levels[0] = {log0, maxskip0};
-    levels[1] = {log1, maxskip1};
+    levels[0].log = log0;
+    levels[0].maxskip = maxskip0;
+    levels[1].log = log1;
+    levels[1].maxskip = maxskip1;
      normalize ();
    }

t



More information about the Gcc-patches mailing list