This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Re: [PATCH 1/4] Clean up of new format of -falign-FOO.


On 07/04/2018 04:23 AM, marxin wrote:

gcc/ChangeLog:

2018-07-11  Martin Liska  <mliska@suse.cz>

	* align.h: New file.

Martin,

I'm seeing lots of warnings for this file:

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

The code that triggers them is:

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

This form of assignment isn't valid in C++ 98.

Thanks
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]