gdb/testsuite/ChangeLog 2016-09-15 Jan Kratochvil * gdb.cp/m-static.cc (gnu_obj_4::somewhere): New. * gdb.cp/m-static.h (class gnu_obj_4): Remove somewhere initializer. diff --git a/gdb/testsuite/gdb.cp/m-static.cc b/gdb/testsuite/gdb.cp/m-static.cc index cb871e8..e5e2d62 100644 --- a/gdb/testsuite/gdb.cp/m-static.cc +++ b/gdb/testsuite/gdb.cp/m-static.cc @@ -77,6 +77,7 @@ gnu_obj_2 gnu_obj_3::data(etruscan); // 2002-08-16 // Test four. #include "m-static.h" +const float gnu_obj_4::somewhere = 3.14159; // instantiate templates explicitly so their static members will exist template class gnu_obj_2; diff --git a/gdb/testsuite/gdb.cp/m-static.h b/gdb/testsuite/gdb.cp/m-static.h index bcedfff..083e1e2 100644 --- a/gdb/testsuite/gdb.cp/m-static.h +++ b/gdb/testsuite/gdb.cp/m-static.h @@ -6,9 +6,10 @@ class gnu_obj_4 static const int elsewhere; static const int nowhere; static const int everywhere = 317; - static const float somewhere = 3.14159; + // see m-static.cc - otherwise: + // error: 'constexpr' needed for in-class initialization of static data member 'const float gnu_obj_4::somewhere' of non-integral type [-fpermissive] + static const float somewhere; // try to ensure test4 is actually allocated int dummy; }; -