aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-12-16 19:25:32 +0000
committerPedro Alves <palves@redhat.com>2015-12-16 19:25:32 +0000
commita4e22a5df64a46bc99f737a982c0b9d1e8a45e2b (patch)
tree7c0b9ab159fba2c2565ac47f8dcd8c4ea1dfaeb0 /ld
parent72d98d16ed09584660d0cbb759d90f8dfeef2343 (diff)
downloadgdb-a4e22a5df64a46bc99f737a982c0b9d1e8a45e2b.zip
gdb-a4e22a5df64a46bc99f737a982c0b9d1e8a45e2b.tar.gz
gdb-a4e22a5df64a46bc99f737a982c0b9d1e8a45e2b.tar.bz2
[C++] Fix -Winvalid-offsetof warnings with g++ 4.4
Ref: https://sourceware.org/ml/gdb/2015-12/msg00014.html Fixes the build in C++ mode with g++ 4.4: gdb/btrace.h: In function ‘size_t VEC_btrace_insn_s_embedded_size(int)’: gdb/btrace.h:84: error: invalid access to non-static data member ‘VEC_btrace_insn_s::vec’ of NULL object gdb/btrace.h:84: error: (perhaps the ‘offsetof’ macro was used incorrectly) gdb/btrace.h: In function ‘VEC_btrace_insn_s* VEC_btrace_insn_s_alloc(int)’: gdb/btrace.h:84: error: invalid access to non-static data member ‘VEC_btrace_insn_s::vec’ of NULL object gdb/btrace.h:84: error: (perhaps the ‘offsetof’ macro was used incorrectly) gdb/btrace.h: In function ‘VEC_btrace_insn_s* VEC_btrace_insn_s_copy(VEC_btrace_insn_s*)’: gdb/btrace.h:84: error: invalid access to non-static data member ‘VEC_btrace_insn_s::vec’ of NULL object gdb/btrace.h:84: error: (perhaps the ‘offsetof’ macro was used incorrectly) gdb/btrace.h: In function ‘VEC_btrace_insn_s* VEC_btrace_insn_s_merge(VEC_btrace_insn_s*, VEC_btrace_insn_s*)’: gdb/btrace.h:84: error: invalid access to non-static data member ‘VEC_btrace_insn_s::vec’ of NULL object gdb/btrace.h:84: error: (perhaps the ‘offsetof’ macro was used incorrectly) gdb/btrace.h: In function ‘int VEC_btrace_insn_s_reserve(VEC_btrace_insn_s**, int, const char*, unsigned int)’: gdb/btrace.h:84: error: invalid access to non-static data member ‘VEC_btrace_insn_s::vec’ of NULL object gdb/btrace.h:84: error: (perhaps the ‘offsetof’ macro was used incorrectly) gdb/ChangeLog: 2015-12-16 Pedro Alves <palves@redhat.com> * common/vec.h (vec_offset): New macro. (DEF_VEC_ALLOC_FUNC_I, DEF_VEC_ALLOC_FUNC_O): Use it instead of offsetof.
Diffstat (limited to 'ld')
0 files changed, 0 insertions, 0 deletions