From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id E97E73858C54 for ; Wed, 8 Mar 2023 10:13:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E97E73858C54 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678270433; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AdPJldUMCBE1PFGz1e+NN0LfMo853AoKXGwlXncJQfM=; b=Vj7eNtVPrbL18Nxa41jIRUGDBGBKcEYaeGa0Qayh48YmbZa1OKwa3V7vkX9GPO9W4tR+pA yEoz9fo4uV6eimzOSW+zk62dqhGU7aYWOSIzL3S0IZnKFly468l1r+NtEgYI8fQw6oYsyH g/gLyNpRWCc1gRPf2mDH0QE6MqfG/Nc= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-214-keQwqioCMhSHjHaY1_u3VQ-1; Wed, 08 Mar 2023 05:13:52 -0500 X-MC-Unique: keQwqioCMhSHjHaY1_u3VQ-1 Received: by mail-lj1-f199.google.com with SMTP id b5-20020a2ebc05000000b00295bab7c7d0so5314607ljf.15 for ; Wed, 08 Mar 2023 02:13:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678270431; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=AdPJldUMCBE1PFGz1e+NN0LfMo853AoKXGwlXncJQfM=; b=F7TAq42Rys1qWhNMYfKlHjywHOMLla9cKxCEj6WfvX9kGdupY4335G8qgUAY0h7ef1 kSmEdlhJbJ7s/0Zi3zNzGPmAYnapOv45ivual26siSSmlSxL80MwgxWC++NDhzK0wfqM BVen+yOzzGxfFemYPdXbCdO5REW11Gk4qtvz68v0WJ/fY1NTm/lUfJSoa+HCrXSuTGOn mTzbNzgyqz0eMZSI0WKm8DsaNXRAg98AVts/V1lakjb2H8XvVsX5AfuQfDqGRThSq+Pw TVIA9gJEYdPKeQ1FygWGkTFPNo0zRZmmcDHgcg1ZmjKzH/XBd5MnaCK4yrpoGL5mozVw vg5g== X-Gm-Message-State: AO0yUKUXRvNTe6nzlZsxE3QKLox8frwiqs9hxo69aiFkhQJSb36r8D+u YMdbhLgkrMzdwfbbX+YNcExHLqtZdBUcAqDZf9Vag2XBPUhiLKl8F128hzsqqDC3O7qTv17LIXr M7Pxvqdy6oC7z1N0RqnWwge2Keq5ySVLPVw== X-Received: by 2002:a05:651c:1722:b0:298:6d79:c6d7 with SMTP id be34-20020a05651c172200b002986d79c6d7mr587570ljb.7.1678270430912; Wed, 08 Mar 2023 02:13:50 -0800 (PST) X-Google-Smtp-Source: AK7set8STKvnQk5ElLkdBW7B04fsz+Pr8k9T/z0iTJ3I6Zk3D0zs/98vy8E/htCSryoktOZxt3sXQvg/3SLRdM4Ykxo= X-Received: by 2002:a05:651c:1722:b0:298:6d79:c6d7 with SMTP id be34-20020a05651c172200b002986d79c6d7mr587564ljb.7.1678270430619; Wed, 08 Mar 2023 02:13:50 -0800 (PST) MIME-Version: 1.0 References: <20230306101121.3CFDA13A66@imap2.suse-dmz.suse.de> <758f3df6-7d0c-0712-fd79-b6e391cb402d@ispras.ru> In-Reply-To: From: Jonathan Wakely Date: Wed, 8 Mar 2023 10:13:39 +0000 Message-ID: Subject: Re: [PATCH] [RFC] RAII auto_mpfr and autp_mpz To: Richard Biener Cc: Alexander Monakov , gcc-patches@gcc.gnu.org, Jakub Jelinek X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 8 Mar 2023 at 07:25, Richard Biener wrote: > > On Wed, 8 Mar 2023, Alexander Monakov wrote: > > > > > On Tue, 7 Mar 2023, Jonathan Wakely wrote: > > > > > > Shouldn't this use the idiom suggested in ansidecl.h, i.e. > > > > > > > > private: > > > > DISABLE_COPY_AND_ASSIGN (auto_mpfr); > > > > > > > > > Why? A macro like that (or a base class like boost::noncopyable) has > > > some value in a code base that wants to work for both C++03 and C++11 > > > (or later). But in GCC we know we have C++11 now, so we can just > > > delete members. I don't see what the macro adds. > > > > Evidently it's possible to forget to delete one of the members, as > > showcased in this very thread. > > Yes. And I copy&pasted from somewhere I forgot which also forgot it ... Looks like gcc/gimple-predicate-analysis.h and gcc/timevar.h each have two cases of a deleted copy constructor but no deleted assignment. I'll send a patch for those. > > The idiom is also slightly easier to read. > > Of course inconsistency in the code-base isn't helping that. > auto_bitmap seems to declare but not define things (including > move assign/CTOR?) I'll change those to deleted too.