This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug build/21773] binutils-gdb/gdb/common/vec.h:1085:31: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘btrace_insn_s {aka struct btrace_insn}’ from an array of ‘btrace_insn_s [1] {aka struct btrace_insn [1]}’ [-Werror=class-m
- From: "msebor at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 15 Aug 2017 18:03:35 +0000
- Subject: [Bug build/21773] binutils-gdb/gdb/common/vec.h:1085:31: error: ‘void* memcpy(void*, const void*, size_t)’ copying an object of non-trivial type ‘btrace_insn_s {aka struct btrace_insn}’ from an array of ‘btrace_insn_s [1] {aka struct btrace_insn [1]}’ [-Werror=class-m
- Auto-submitted: auto-generated
- References: <bug-21773-4717@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=21773
Martin Sebor <msebor at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msebor at gmail dot com
--- Comment #1 from Martin Sebor <msebor at gmail dot com> ---
The errors were discussed on gcc-patches, along with a trivial patch for them:
https://gcc.gnu.org/ml/gcc-patches/2017-07/msg00299.html
The solution might need to be guarded if GDB is meant to compile with C++ 98
compiler. Like so:
index ddfcddf..f344c4b 100644
--- a/gdb/common/enum-flags.h
+++ b/gdb/common/enum-flags.h
@@ -116,9 +116,13 @@ private:
public:
/* Allow default construction. */
+#if __cplusplus >= 201103L
+ enum_flags () = default;
+#else
enum_flags ()
: m_enum_value ((enum_type) 0)
{}
+#endif
/* If you get an error saying these two overloads are ambiguous,
then you tried to mix values of different enum types. */
--
You are receiving this mail because:
You are on the CC list for the bug.