This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Don't memset non-POD types: struct breakpoint
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Mon, 24 Apr 2017 23:08:19 -0400
- Subject: [binutils-gdb] Don't memset non-POD types: struct breakpoint
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 16c4d54a71d8052988ed9c8005a03a7f934245f4 ***
Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 16c4d54a71d8052988ed9c8005a03a7f934245f4
Don't memset non-POD types: struct breakpoint
Eh, struct breakpoint was made non-POD just today, with commit
d28cd78ad820e3 ("Change breakpoint event locations to
event_location_up"). :-)
src/gdb/breakpoint.c: In function void init_raw_breakpoint_without_location(breakpoint*, gdbarch*, bptype, const breakpoint_ops*):
src/gdb/breakpoint.c:7447:28: error: use of deleted function void* memset(T*, int, size_t) [with T = breakpoint; <template-parameter-1-2> = void; size_t = long unsigned int]
memset (b, 0, sizeof (*b));
^
In file included from src/gdb/common/common-defs.h:85:0,
from src/gdb/defs.h:28,
from src/gdb/breakpoint.c:20:
src/gdb/common/poison.h:56:7: note: declared here
void *memset (T *s, int c, size_t n) = delete;
^
gdb/ChangeLog:
2017-04-25 Pedro Alves <palves@redhat.com>
* breakpoint.h (struct breakpoint): In-class initialize all
fields. Make boolean fields "bool".
* breakpoint.c (init_raw_breakpoint_without_location): Remove
memset call and initializations no longer necessary.