This is the mail archive of the
mailing list for the GDB project.
Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate
- From: Pedro Alves <palves at redhat dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 4 May 2017 19:28:59 +0100
- Subject: Re: Oh dear. I regret to inform you that commit 'RAII-fy make_cleanup_restore_current_thread & friends' might be unfortunate
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx08.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 3B533C059729
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3B533C059729
- References: <E1d6JGc-0000zB-OE@kwanyin.sergiodj.net> <email@example.com> <firstname.lastname@example.org> <email@example.com>
On 05/04/2017 07:22 PM, Pedro Alves wrote:
> AFAICS so far, this is a false positive.
> Not sure what to do. I wouldn't want to force-memset
> the optional's storage to work around it, which would be
> a pessimization to quiet a warning. From above, we see that
> that wouldn't work when we later start using std::optional.
> There's a bug open about this (for boost::optional, but most
> probably the exact same):
I've tried the reproducer there with the obvious change to use
std::optional and that does not warn. So this is a different,
though related issue.
Or maybe there's really something wrong with the gdb code
that is escaping me.