C++11: GLIBMM_INITIALIZE_STRUCT



It would be nice to have some general fix for this warning when using
--std=c++11 with g++:

optiongroup.cc: In member function 'void
Glib::OptionGroup::add_entry(const Glib::OptionEntry&)':
optiongroup.cc:320:3: error: missing initializer for member
'_GOptionEntry::short_name' [-Werror=missing-field-initializers]
optiongroup.cc:320:3: error: missing initializer for member
'_GOptionEntry::flags' [-Werror=missing-field-initializers]
optiongroup.cc:320:3: error: missing initializer for member
'_GOptionEntry::arg' [-Werror=missing-field-initializers]
optiongroup.cc:320:3: error: missing initializer for member
'_GOptionEntry::arg_data' [-Werror=missing-field-initializers]
optiongroup.cc:320:3: error: missing initializer for member
'_GOptionEntry::description' [-Werror=missing-field-initializers]
optiongroup.cc:320:3: error: missing initializer for member
'_GOptionEntry::arg_description' [-Werror=missing-field-initializers]

It's caused by the GLIBMM_INITIALIZE_STRUCT macro definition using the
second possibility rather than the first, because __STRICT_ANSI__ is not
defined, but I don't know why that would have been defined before, but
not with C++11.
https://git.gnome.org/browse/glibmm/tree/glib/glibmm/utility.h#n28

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]