From: Saagar Jha <saagar@saagarjha.com>
To: Simon Marchi <simark@simark.ca>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Add a missing munmap_list move constructor
Date: Thu, 24 Sep 2020 23:59:22 -0700 [thread overview]
Message-ID: <883A80DB-0918-4BA6-B387-A54581BFEA42@saagarjha.com> (raw)
In-Reply-To: <0c94705e-d735-7b9d-d730-72df4988de33@simark.ca>
No, actually I’m not seeing that error; this is what I was trying to fix (yes, I’ll put it into the commit message when I update the patch):
In file included from compile/compile-object-load.c:21:
compile/compile-object-load.h:56:3: error: explicitly defaulted move constructor is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
compile_module (compile_module &&other) = default;
^
compile/compile-object-load.h:86:22: note: move constructor of 'compile_module' is implicitly deleted because field 'munmap_list' has a deleted move constructor
struct munmap_list munmap_list;
^
compile/compile-object-load.h:30:28: note: 'munmap_list' has been explicitly marked deleted here
DISABLE_COPY_AND_ASSIGN (munmap_list);
^
To be clear, I am building GDB for macOS and found this because my CI told me about it: https://travis-ci.com/github/saagarjha/binutils-gdb. Until now the build has been green, so I am assuming that the compiler I have been using either doesn’t warn on the issue or that code looks fine to it…in any case, for the code it’s complaining about I think we should be able to take guidance on ownership from the copy assignment operator right above that destructor.
> On Sep 24, 2020, at 08:27, Simon Marchi <simark@simark.ca> wrote:
>
> On 2020-09-24 1:22 a.m., Saagar Jha wrote:
>> Clang warns if the default implementation of a function is requested but it is implicitly deleted. This was happening to compile_module because it didn’t have a move constructor for its munmap_list member, so I went ahead and added one since it already had a move assignment operator defined for it and this seemed like an oversight.
>>
>
> When fixing a compilation failure, please always include a paste of the
> error in the commit message. But the change itself looks good to me.
>
> If you are compiling with clang I presume you also see this error in
> macroexp.c?
>
> /home/simark/src/binutils-gdb/gdb/macroexp.c:125:3: error: definition of implicit copy constructor for 'macro_buffer' is deprecated because it has a user-declared destructor [-Werror,-Wdeprecated-copy-dtor]
> ~macro_buffer ()
> ^
>
> I've tried to look into it in the past but I didn't manage to fix it.
> The ownership model in there is a big bowl of spaghetti.
>
> Simon
next prev parent reply other threads:[~2020-09-25 6:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-24 5:22 Saagar Jha
2020-09-24 15:27 ` Simon Marchi
2020-09-25 6:59 ` Saagar Jha [this message]
2020-09-25 7:05 ` Saagar Jha
2020-09-25 7:05 ` Saagar Jha
2020-09-25 14:58 ` Simon Marchi
2020-09-26 0:25 ` Saagar Jha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=883A80DB-0918-4BA6-B387-A54581BFEA42@saagarjha.com \
--to=saagar@saagarjha.com \
--cc=gdb-patches@sourceware.org \
--cc=simark@simark.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox