This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA v2 10/17] C++ify mi_parse
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Wed, 12 Apr 2017 12:26:16 +0100
- Subject: Re: [RFA v2 10/17] C++ify mi_parse
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 28522C04B93E
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 28522C04B93E
- References: <20170411150112.23207-1-tom@tromey.com> <20170411150112.23207-11-tom@tromey.com>
On 04/11/2017 04:01 PM, Tom Tromey wrote:
> - memset (parse, 0, sizeof (*parse));
> + std::unique_ptr<struct mi_parse> parse (new struct mi_parse);
> + memset (parse.get (), 0, sizeof (struct mi_parse));
> parse->all = 0;
The patch made mi_parse be a non-POD (non-trivial dtor), so I
think we should get rid of that memset at the same time.
Thanks,
Pedro Alves