From patchwork Sat Sep 14 07:23:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 1985591 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Jxbn2sgt; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.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 ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X5N2Q6jzwz1y1C for ; Sat, 14 Sep 2024 17:23:42 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DF85A3858288 for ; Sat, 14 Sep 2024 07:23:40 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by sourceware.org (Postfix) with ESMTPS id 8A3803858C98 for ; Sat, 14 Sep 2024 07:23:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8A3803858C98 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=quicinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 8A3803858C98 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726298599; cv=none; b=VBSmmYxo2lB/XwjpQlt/jG5tG8C/A6sTSAMiN6AkV9yQGT4zl1gQsNJHdkjzql3cLdPozhYo+8oDbGNYtxiLkvH0TZGEyuhVT0/eUH/umRLpx56gpyHSkSeFmKCW0BdxHbp+ViKw/QSX+38WErG0fBC0xHDsnsDG3A933rCmGTY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1726298599; c=relaxed/simple; bh=GsuE5lQsLIdwJAdgtAGv86qa8Pyov+3/De2F2Rjelqg=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Faf74of5rjtse42COf+mg5pV3tXIgnLPJOZKk0uCkmhgukqTvGg0auLhzSWA7iKyN5wXIU4qcBOQKuFA52jAjsz02jgjUsDIkOP/qVQmkU+8CCrl2Ruy4seb9zPxtY+KHIlwYkTyq5x8L/+0tC/Pb5NiBfhR6cspa2b0Hgg4eC0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 48E68cKe018784 for ; Sat, 14 Sep 2024 07:23:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=FfujzC1aIRCnlbgdrNoNDP tdDgCwKFDkYZyK0M7pZ88=; b=Jxbn2sgtkeVAK8X0jOLXeUNGadSPesrb/yXenC B+t6Ss5XwapIehzIESfzw7Lm0HzRAatdBKDxkuecbv3F8i/QFAtDoje48GNeyvyN Qx3U8H8BN6B1a9d5ySydsL/+QtI2nhpSsJBLjyVjNsTfwuopUZKkInvMIOfvs0ei vnMkje9PoMfaAgt0fWk0a3Dgvjom4tz6s8Zf/Ggv0ZICRb/4bR7hrY1uOhNXu1W3 Bi7ep7yCuiltMP/UvHkxWHeDxOSp0Wd4a5fQ5yReuG5NSYBy0LHFK62HkdTiaG3j OW2liET7HBOu6Jq/92qzC4RsZZ7jBLvYbaON0kpwBJzvI8IQ== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 41n4gcr4hx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 14 Sep 2024 07:23:15 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 48E7NFDM016193 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 14 Sep 2024 07:23:15 GMT Received: from hu-apinski-lv.qualcomm.com (10.49.16.6) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Sat, 14 Sep 2024 00:23:14 -0700 From: Andrew Pinski To: CC: Andrew Pinski Subject: [PATCH] Mark the copy/move constructor/operator= of auto_bitmap as delete Date: Sat, 14 Sep 2024 00:23:01 -0700 Message-ID: <20240914072301.59833-1-quic_apinski@quicinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01a.na.qualcomm.com (10.47.209.196) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: soomEXFaLQnPwLeRlp8fwRRh8p7OyFbM X-Proofpoint-GUID: soomEXFaLQnPwLeRlp8fwRRh8p7OyFbM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 suspectscore=0 bulkscore=0 clxscore=1015 spamscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=965 impostorscore=0 mlxscore=0 priorityscore=1501 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2408220000 definitions=main-2409140049 X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Since we are written in C++11, these should be marked as delete rather than just private. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * bitmap.h (class auto_bitmap): Mark copy/move constructor/operator= as deleted. Signed-off-by: Andrew Pinski --- gcc/bitmap.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gcc/bitmap.h b/gcc/bitmap.h index 4cad1b4d6c6..451edcfc590 100644 --- a/gcc/bitmap.h +++ b/gcc/bitmap.h @@ -959,10 +959,10 @@ class auto_bitmap private: // Prevent making a copy that references our bitmap. - auto_bitmap (const auto_bitmap &); - auto_bitmap &operator = (const auto_bitmap &); - auto_bitmap (auto_bitmap &&); - auto_bitmap &operator = (auto_bitmap &&); + auto_bitmap (const auto_bitmap &) = delete; + auto_bitmap &operator = (const auto_bitmap &) = delete; + auto_bitmap (auto_bitmap &&) = delete; + auto_bitmap &operator = (auto_bitmap &&) = delete; bitmap_head m_bits; };