Since is_trivially_default_constructible was not implemented before gcc-5
it cannot be used with gcc-4.x.
Fix the build by using conditional compilation around that line.
Use the equivalent is_trivially_constructible<T> instead, since
we already have HAVE_IS_TRIVIALLY_CONSTRUCTIBLE for that purpose.
Fixes: 098caef485a ("Refactor struct trad_frame_saved_regs")
gdb:
2021-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
* trad-frame.c (trad_frame_alloc_saved_regs): Avoid compile-error
because is_trivially_default_constructible was first implemented with
gcc-5.
+2021-01-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * trad-frame.c (trad_frame_alloc_saved_regs): Avoid compile-error
+ because is_trivially_default_constructible was first implemented with
+ gcc-5.
+
2021-01-14 Tom de Vries <tdevries@suse.de>
PR breakpoints/27151
#include "target.h"
#include "value.h"
#include "gdbarch.h"
+#include "gdbsupport/traits.h"
struct trad_frame_cache
{
trad_frame_saved_reg *
trad_frame_alloc_saved_regs (struct gdbarch *gdbarch)
{
- gdb_static_assert (std::is_trivially_default_constructible<trad_frame_saved_reg>::value);
+#ifdef HAVE_IS_TRIVIALLY_CONSTRUCTIBLE
+ gdb_static_assert (std::is_trivially_constructible<trad_frame_saved_reg>::value);
+#endif
int numregs = gdbarch_num_cooked_regs (gdbarch);
trad_frame_saved_reg *this_saved_regs