public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* commited: avoid extended initializer lists warnings
@ 2018-07-19 22:15 Martin Sebor
  0 siblings, 0 replies; only message in thread
From: Martin Sebor @ 2018-07-19 22:15 UTC (permalink / raw)
  To: Gcc Patch List; +Cc: Martin Liška

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-07-19 22:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-19 22:15 commited: avoid extended initializer lists warnings Martin Sebor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).