diff mbox series

commited: avoid extended initializer lists warnings

Message ID f9ceda52-53ac-6525-c28c-afea1f0a5603@gmail.com
State New
Headers show
Series commited: avoid extended initializer lists warnings | expand

Commit Message

Martin Sebor July 19, 2018, 10:15 p.m. UTC
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


t
diff mbox series

Patch

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 ();
    }