dilyan.palauzov at aegee dot org
2017-07-15 10:08:17 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=21773
Bug ID: 21773
Summary: 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
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: dilyan.palauzov at aegee dot org
Target Milestone: ---
Most current gdb does not compile with most current gcc:
make[6]: Leaving directory '/home/d/binutils/gdb/build-gnulib/import'
make[5]: Leaving directory '/home/d/binutils/gdb/build-gnulib'
make[4]: Leaving directory '/home/d/binutils/gdb/build-gnulib'
make[3]: Leaving directory '/home/d/binutils/gdb'
g++ -x c++ -g -O2 -I. -I/git/binutils-gdb/gdb -I/git/binutils-gdb/gdb/common
-I/git/binutils-gdb/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\""
-DHAVE_CONFIG_H -I/git/binutils-gdb/gdb/../include/opcode
-I/git/binutils-gdb/gdb/../opcodes/.. -I../bfd -I/git/binutils-gdb/gdb/../bfd
-I/git/binutils-gdb/gdb/../include -I../libdecnumber
-I/git/binutils-gdb/gdb/../libdecnumber -I/git/binutils-gdb/gdb/gnulib/import
-Ibuild-gnulib/import -I/usr/local/include/python3.5m
-I/usr/local/include/python3.5m -Wall -Wpointer-arith -Wno-unused
-Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
-Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare
-Wno-narrowing -Wno-error=maybe-uninitialized -Werror -c -o arc-tdep.o -MT
arc-tdep.o -MMD -MP -MF .deps/arc-tdep.Tpo /git/binutils-gdb/gdb/arc-tdep.c
In file included from /git/binutils-gdb/gdb/common/gdb_vecs.h:23:0,
from /git/binutils-gdb/gdb/symtab.h:24,
from /git/binutils-gdb/gdb/language.h:26,
from /git/binutils-gdb/gdb/frame.h:72,
from /git/binutils-gdb/gdb/gdbarch.h:39,
from /git/binutils-gdb/gdb/defs.h:636,
from /git/binutils-gdb/gdb/arc-tdep.c:22:
/git/binutils-gdb/gdb/btrace.h: In function ‘VEC_btrace_insn_s*
VEC_btrace_insn_s_copy(VEC_btrace_insn_s*)’:
/git/binutils-gdb/gdb/common/vec.h:1065:58: 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-memaccess]
memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); \
^
/git/binutils-gdb/gdb/common/vec.h:461:1: note: in expansion of macro
‘DEF_VEC_ALLOC_FUNC_O’
DEF_VEC_ALLOC_FUNC_O(T) \
^~~~~~~~~~~~~~~~~~~~
/git/binutils-gdb/gdb/btrace.h:86:1: note: in expansion of macro ‘DEF_VEC_O’
DEF_VEC_O (btrace_insn_s);
^~~~~~~~~
In file included from /git/binutils-gdb/gdb/target.h:74:0,
from /git/binutils-gdb/gdb/exec.h:23,
from /git/binutils-gdb/gdb/gdbcore.h:29,
from /git/binutils-gdb/gdb/arc-tdep.c:28:
/git/binutils-gdb/gdb/btrace.h:69:8: note: ‘btrace_insn_s {aka struct
btrace_insn}’ declared here
struct btrace_insn
^~~~~~~~~~~
In file included from /git/binutils-gdb/gdb/common/gdb_vecs.h:23:0,
from /git/binutils-gdb/gdb/symtab.h:24,
from /git/binutils-gdb/gdb/language.h:26,
from /git/binutils-gdb/gdb/frame.h:72,
from /git/binutils-gdb/gdb/gdbarch.h:39,
from /git/binutils-gdb/gdb/defs.h:636,
from /git/binutils-gdb/gdb/arc-tdep.c:22:
/git/binutils-gdb/gdb/btrace.h: In function ‘VEC_btrace_insn_s*
VEC_btrace_insn_s_merge(VEC_btrace_insn_s*, VEC_btrace_insn_s*)’:
/git/binutils-gdb/gdb/common/vec.h:1083:65: 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-memaccess]
memcpy (new_vec_->vec, vec1_->vec, sizeof (T) * vec1_->num); \
^
/git/binutils-gdb/gdb/common/vec.h:461:1: note: in expansion of macro
‘DEF_VEC_ALLOC_FUNC_O’
DEF_VEC_ALLOC_FUNC_O(T) \
^~~~~~~~~~~~~~~~~~~~
/git/binutils-gdb/gdb/btrace.h:86:1: note: in expansion of macro ‘DEF_VEC_O’
DEF_VEC_O (btrace_insn_s);
^~~~~~~~~
In file included from /git/binutils-gdb/gdb/target.h:74:0,
from /git/binutils-gdb/gdb/exec.h:23,
from /git/binutils-gdb/gdb/gdbcore.h:29,
from /git/binutils-gdb/gdb/arc-tdep.c:28:
/git/binutils-gdb/gdb/btrace.h:69:8: note: ‘btrace_insn_s {aka struct
btrace_insn}’ declared here
struct btrace_insn
^~~~~~~~~~~
In file included from /git/binutils-gdb/gdb/common/gdb_vecs.h:23:0,
from /git/binutils-gdb/gdb/symtab.h:24,
from /git/binutils-gdb/gdb/language.h:26,
from /git/binutils-gdb/gdb/frame.h:72,
from /git/binutils-gdb/gdb/gdbarch.h:39,
from /git/binutils-gdb/gdb/defs.h:636,
from /git/binutils-gdb/gdb/arc-tdep.c:22:
/git/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-memaccess]
sizeof (T) * vec2_->num); \
^
/git/binutils-gdb/gdb/common/vec.h:461:1: note: in expansion of macro
‘DEF_VEC_ALLOC_FUNC_O’
DEF_VEC_ALLOC_FUNC_O(T) \
^~~~~~~~~~~~~~~~~~~~
/git/binutils-gdb/gdb/btrace.h:86:1: note: in expansion of macro ‘DEF_VEC_O’
DEF_VEC_O (btrace_insn_s);
^~~~~~~~~
In file included from /git/binutils-gdb/gdb/target.h:74:0,
from /git/binutils-gdb/gdb/exec.h:23,
from /git/binutils-gdb/gdb/gdbcore.h:29,
from /git/binutils-gdb/gdb/arc-tdep.c:28:
/git/binutils-gdb/gdb/btrace.h:69:8: note: ‘btrace_insn_s {aka struct
btrace_insn}’ declared here
struct btrace_insn
^~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:1910: arc-tdep.o] Error 1
make[2]: Leaving directory '/home/d/binutils/gdb'
make[1]: *** [Makefile:10439: all-gdb] Error 2
make[1]: Leaving directory '/home/d/binutils'
make: *** [Makefile:850: all] Error 2
Bug ID: 21773
Summary: 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
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: build
Assignee: unassigned at sourceware dot org
Reporter: dilyan.palauzov at aegee dot org
Target Milestone: ---
Most current gdb does not compile with most current gcc:
make[6]: Leaving directory '/home/d/binutils/gdb/build-gnulib/import'
make[5]: Leaving directory '/home/d/binutils/gdb/build-gnulib'
make[4]: Leaving directory '/home/d/binutils/gdb/build-gnulib'
make[3]: Leaving directory '/home/d/binutils/gdb'
g++ -x c++ -g -O2 -I. -I/git/binutils-gdb/gdb -I/git/binutils-gdb/gdb/common
-I/git/binutils-gdb/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\""
-DHAVE_CONFIG_H -I/git/binutils-gdb/gdb/../include/opcode
-I/git/binutils-gdb/gdb/../opcodes/.. -I../bfd -I/git/binutils-gdb/gdb/../bfd
-I/git/binutils-gdb/gdb/../include -I../libdecnumber
-I/git/binutils-gdb/gdb/../libdecnumber -I/git/binutils-gdb/gdb/gnulib/import
-Ibuild-gnulib/import -I/usr/local/include/python3.5m
-I/usr/local/include/python3.5m -Wall -Wpointer-arith -Wno-unused
-Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body
-Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare
-Wno-narrowing -Wno-error=maybe-uninitialized -Werror -c -o arc-tdep.o -MT
arc-tdep.o -MMD -MP -MF .deps/arc-tdep.Tpo /git/binutils-gdb/gdb/arc-tdep.c
In file included from /git/binutils-gdb/gdb/common/gdb_vecs.h:23:0,
from /git/binutils-gdb/gdb/symtab.h:24,
from /git/binutils-gdb/gdb/language.h:26,
from /git/binutils-gdb/gdb/frame.h:72,
from /git/binutils-gdb/gdb/gdbarch.h:39,
from /git/binutils-gdb/gdb/defs.h:636,
from /git/binutils-gdb/gdb/arc-tdep.c:22:
/git/binutils-gdb/gdb/btrace.h: In function ‘VEC_btrace_insn_s*
VEC_btrace_insn_s_copy(VEC_btrace_insn_s*)’:
/git/binutils-gdb/gdb/common/vec.h:1065:58: 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-memaccess]
memcpy (new_vec_->vec, vec_->vec, sizeof (T) * len_); \
^
/git/binutils-gdb/gdb/common/vec.h:461:1: note: in expansion of macro
‘DEF_VEC_ALLOC_FUNC_O’
DEF_VEC_ALLOC_FUNC_O(T) \
^~~~~~~~~~~~~~~~~~~~
/git/binutils-gdb/gdb/btrace.h:86:1: note: in expansion of macro ‘DEF_VEC_O’
DEF_VEC_O (btrace_insn_s);
^~~~~~~~~
In file included from /git/binutils-gdb/gdb/target.h:74:0,
from /git/binutils-gdb/gdb/exec.h:23,
from /git/binutils-gdb/gdb/gdbcore.h:29,
from /git/binutils-gdb/gdb/arc-tdep.c:28:
/git/binutils-gdb/gdb/btrace.h:69:8: note: ‘btrace_insn_s {aka struct
btrace_insn}’ declared here
struct btrace_insn
^~~~~~~~~~~
In file included from /git/binutils-gdb/gdb/common/gdb_vecs.h:23:0,
from /git/binutils-gdb/gdb/symtab.h:24,
from /git/binutils-gdb/gdb/language.h:26,
from /git/binutils-gdb/gdb/frame.h:72,
from /git/binutils-gdb/gdb/gdbarch.h:39,
from /git/binutils-gdb/gdb/defs.h:636,
from /git/binutils-gdb/gdb/arc-tdep.c:22:
/git/binutils-gdb/gdb/btrace.h: In function ‘VEC_btrace_insn_s*
VEC_btrace_insn_s_merge(VEC_btrace_insn_s*, VEC_btrace_insn_s*)’:
/git/binutils-gdb/gdb/common/vec.h:1083:65: 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-memaccess]
memcpy (new_vec_->vec, vec1_->vec, sizeof (T) * vec1_->num); \
^
/git/binutils-gdb/gdb/common/vec.h:461:1: note: in expansion of macro
‘DEF_VEC_ALLOC_FUNC_O’
DEF_VEC_ALLOC_FUNC_O(T) \
^~~~~~~~~~~~~~~~~~~~
/git/binutils-gdb/gdb/btrace.h:86:1: note: in expansion of macro ‘DEF_VEC_O’
DEF_VEC_O (btrace_insn_s);
^~~~~~~~~
In file included from /git/binutils-gdb/gdb/target.h:74:0,
from /git/binutils-gdb/gdb/exec.h:23,
from /git/binutils-gdb/gdb/gdbcore.h:29,
from /git/binutils-gdb/gdb/arc-tdep.c:28:
/git/binutils-gdb/gdb/btrace.h:69:8: note: ‘btrace_insn_s {aka struct
btrace_insn}’ declared here
struct btrace_insn
^~~~~~~~~~~
In file included from /git/binutils-gdb/gdb/common/gdb_vecs.h:23:0,
from /git/binutils-gdb/gdb/symtab.h:24,
from /git/binutils-gdb/gdb/language.h:26,
from /git/binutils-gdb/gdb/frame.h:72,
from /git/binutils-gdb/gdb/gdbarch.h:39,
from /git/binutils-gdb/gdb/defs.h:636,
from /git/binutils-gdb/gdb/arc-tdep.c:22:
/git/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-memaccess]
sizeof (T) * vec2_->num); \
^
/git/binutils-gdb/gdb/common/vec.h:461:1: note: in expansion of macro
‘DEF_VEC_ALLOC_FUNC_O’
DEF_VEC_ALLOC_FUNC_O(T) \
^~~~~~~~~~~~~~~~~~~~
/git/binutils-gdb/gdb/btrace.h:86:1: note: in expansion of macro ‘DEF_VEC_O’
DEF_VEC_O (btrace_insn_s);
^~~~~~~~~
In file included from /git/binutils-gdb/gdb/target.h:74:0,
from /git/binutils-gdb/gdb/exec.h:23,
from /git/binutils-gdb/gdb/gdbcore.h:29,
from /git/binutils-gdb/gdb/arc-tdep.c:28:
/git/binutils-gdb/gdb/btrace.h:69:8: note: ‘btrace_insn_s {aka struct
btrace_insn}’ declared here
struct btrace_insn
^~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:1910: arc-tdep.o] Error 1
make[2]: Leaving directory '/home/d/binutils/gdb'
make[1]: *** [Makefile:10439: all-gdb] Error 2
make[1]: Leaving directory '/home/d/binutils'
make: *** [Makefile:850: all] Error 2
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.