On 21 December 2015 at 16:11, Joe Stringer <j...@ovn.org> wrote: > On 21 December 2015 at 16:01, Ben Pfaff <b...@ovn.org> wrote: >> On Mon, Dec 21, 2015 at 03:56:40PM -0800, Joe Stringer wrote: >>> The previous definitions of these variables using designated >>> initializers caused a variety of issues when attempting to compile with >>> MSVC, particularly if including these headers from C++ code. By defining >>> them like this, we can appease MSVC and keep the definitions the same on >>> all platforms. >>> >>> VMware-BZ: #1517163 >>> Suggested-by: Yin Lin <li...@vmware.com> >>> Signed-off-by: Joe Stringer <j...@ovn.org> >> >> Why not just use a new-enough MSVC? According to this discussion of the >> topic, MSVC 2013 and newer support designated initializers in C++: >> >> http://stackoverflow.com/questions/18731707/why-does-c11-not-support-designated-initializer-list-as-c99 > > We have encountered this issue on MSVC2013u3 and MSVC2015u1. As far as > I can tell, the compiler will accept them if it is compiling a .c > file, but it fails if the header is included from a .cpp file.
This page seems to confirm that designated initializers are only supported in C mode: http://blogs.msdn.com/b/vcblog/archive/2015/04/29/c-11-14-17-features-in-vs-2015-rc.aspx _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev