From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id oP0pOFCVbV+vFQAAWB0awg (envelope-from ) for ; Fri, 25 Sep 2020 02:59:28 -0400 Received: by simark.ca (Postfix, from userid 112) id DDF571EF4B; Fri, 25 Sep 2020 02:59:28 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6329F1E599 for ; Fri, 25 Sep 2020 02:59:28 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A5098385041F; Fri, 25 Sep 2020 06:59:27 +0000 (GMT) Received: from mail-pj1-f65.google.com (mail-pj1-f65.google.com [209.85.216.65]) by sourceware.org (Postfix) with ESMTPS id 087A53857C7B for ; Fri, 25 Sep 2020 06:59:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 087A53857C7B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=saagarjha.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=saagarjha28@gmail.com Received: by mail-pj1-f65.google.com with SMTP id b17so1289694pji.1 for ; Thu, 24 Sep 2020 23:59:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=p0heM2FUkRqoVmxc1nEQVAiQzufahm0fjheimHajywg=; b=sHELVEORuO+McZ9TwYu8DTo1gpb1+Ezce31z3T91MkcALmsTvBtx2O/PctZ7Dje2Nj 37v1bQTXzdSAbG+BKwhMfVgqI0xIrSfzeVzjv3S50vt3Ca3vqyIDvRCKOXdjXp7EIluc Fk5rp+SYS20Hi9Za51cZNsEazJs6dvDStAfXPmxCPaSK+yu7rnPbAA9QqSm8kC0200Tl U+rho1o9mydGicDPjgLLUGtJEipB0bPIY+j4JcUTzyzjTdsYORp0gSD8m0GWeO9P5fTW /r/U9Q//Z2fxErF0v+qqGi+mQpE9bf63TjI6tR1/aNUYfi+KsvstADnDundumJW4xO1q Hbiw== X-Gm-Message-State: AOAM530LK+B+PFmSh3tnn2ZiIZwuVGyEzJo4SrFcCPZ1AlO4yuFF4Jmk k3sQLaXRUYTmPp9qBQ8TO8QSW7QjZig= X-Google-Smtp-Source: ABdhPJyL1dhGR2+LxCjoaq22Mpy00GlUW8MEYJYhp4hn3leyrl+k4xIz1jWFoNS4oRN7QXYaDPCcyQ== X-Received: by 2002:a17:90b:1245:: with SMTP id gx5mr1295599pjb.193.1601017163959; Thu, 24 Sep 2020 23:59:23 -0700 (PDT) Received: from localhost.localdomain ([73.92.124.25]) by smtp.gmail.com with ESMTPSA id g23sm1125589pjz.51.2020.09.24.23.59.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Sep 2020 23:59:23 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.0.3.2.33\)) Subject: Re: [PATCH] Add a missing munmap_list move constructor From: Saagar Jha In-Reply-To: <0c94705e-d735-7b9d-d730-72df4988de33@simark.ca> Date: Thu, 24 Sep 2020 23:59:22 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <883A80DB-0918-4BA6-B387-A54581BFEA42@saagarjha.com> References: <58351270-2804-4A48-ABA5-2589312C06B6@saagarjha.com> <0c94705e-d735-7b9d-d730-72df4988de33@simark.ca> To: Simon Marchi X-Mailer: Apple Mail (2.3654.0.3.2.33) X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" No, actually I=E2=80=99m not seeing that error; this is what I was = trying to fix (yes, I=E2=80=99ll 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) =3D 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=E2=80=99t warn on the issue or that code = looks fine to it=E2=80=A6in any case, for the code it=E2=80=99s = 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 wrote: >=20 > 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=E2=80=99t 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. >>=20 >=20 > 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. >=20 > If you are compiling with clang I presume you also see this error in > macroexp.c? >=20 > /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 () > ^ >=20 > 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. >=20 > Simon