From patchwork Tue Sep 13 14:21:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 1184 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp2375804wrt; Tue, 13 Sep 2022 07:22:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR42ye++A3JgStgE8qEiBkuCoVF6pdZQMhY+xBNLqWQ4xggBboSlomU46jEXzxrGZv7AASpQ X-Received: by 2002:a05:6402:ea1:b0:443:d90a:5d31 with SMTP id h33-20020a0564020ea100b00443d90a5d31mr26321139eda.121.1663078945562; Tue, 13 Sep 2022 07:22:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663078945; cv=none; d=google.com; s=arc-20160816; b=zGaJxumii8aNUmlpLiem4e/Gc/ZvkqPdCLb4cGy1rXP3YZG124NiwiPTaoOtMlNwoW dBEkws2l8qziaFaknVBEOtJU4lroU7n5qQ2hA4sC0z6vbgK0OiKgtMDb9CemZk8d3Xfz 0EPvsqLWPl2k4gaoFLVlbWzsv70WDahfMe/MK2/iUHPDVi5bPbx5KlirEvqfo+lg/kYs BDf+EHUIZkn8QUaCKW2rS2Jmim67Ij0ZIvQni2dlM9WdKqpmdDor02yCwhPrQIk4FKCA IKTHMg5pXWagcPVl4slcu6jqMIdWaQQZTPy9pAX82dCikBmqU37Rcmh2RQG8qba+j92q 6m7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=Ps/aV4HShObJZeUSkBtqoP3yFivB14v/fW36JCcToms=; b=jJagUoDzBU+Zd7hWzqYOUtz/r8RyMZixlgELibqNvBUzXN9Rhlea2hYx0h6VFXj0QL FyOshLv/9uYiieCxz2Ls14HyF7l0dOKBYwLyp5QzyHsaXMKrpqWSQhSebClHLl9Eo7BG g2giqbiwEx7rXjaxb14HszsOwqOsaNy7F/MOf10bla1dW2t4B86gLHUZkU7J3plHbK+o 2U4stGLEUQcHhfYX9BIRYK9Nh7EMek1/rJFd/xU1hHsb/Fzipb8tRuLJwH4f/6iY290H eQmvtryHZS8Q41bjoZNTf/xpNt4CBcRTRluewWHx6fUPGvRP02zQH+97I8TuAmdAf6un CGSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ukYlubP0; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id hz5-20020a1709072ce500b0072a72bb6f80si11069735ejc.744.2022.09.13.07.22.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 07:22:25 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=ukYlubP0; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9C58138515D1 for ; Tue, 13 Sep 2022 14:22:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9C58138515D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663078930; bh=Ps/aV4HShObJZeUSkBtqoP3yFivB14v/fW36JCcToms=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=ukYlubP08W/buzfShMI+DrogquPujW4RGL4sk9Thcqv1qu8EBoILKM0LZNrBsqLtq 5X/igM8f+ndzjhtJAal7I+/xbwwopS8vglDJKySWZxEqVuwNjrTLIiMrXTzhgM4XEO F14kcT981O3kQ0e6X6BmyQNyjej56sKChMggirss= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 279103858413 for ; Tue, 13 Sep 2022 14:21:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 279103858413 Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-35-ibM_jrr6NrWSkZ0YnskzFQ-1; Tue, 13 Sep 2022 10:21:24 -0400 X-MC-Unique: ibM_jrr6NrWSkZ0YnskzFQ-1 Received: by mail-qt1-f197.google.com with SMTP id cb22-20020a05622a1f9600b0035bb51792d2so4651143qtb.5 for ; Tue, 13 Sep 2022 07:21:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=Ps/aV4HShObJZeUSkBtqoP3yFivB14v/fW36JCcToms=; b=hmEq8yaxeDcsQedJddb+ZivH1VaJYUOpMcYDb7RM6tgntDo7ubBsmd9u4W0eYgWVfw HGeclID/77IUp1yN5/JLMBdRnQLDqJXwojcdXDL9Ad6LlxCjmaZrLD3gOvf0S/akEDy5 PDtcU+NK6xAOaMK+5vTC3V+WLvkNfoFcFuG+V2YpT/s8o++tAJRlBHo9EgYRKJapuALi vukkFn5t+GxbSgizqc4RiqAHDyo2lTaq/9SDb/NUOKyR7pWCyvYsT1gDZ+WYbk2CrbP9 Y9dora/FmzhD/RkxQWdkbjhsWd3eICpiGXSmmKazg+fo81EmbQzqK9U8AOpnzbrFnXyq dEEA== X-Gm-Message-State: ACgBeo3saSuTrQ2c0zARSbSaNlHlEqtAr5mSZWEkDR6iiZHWK/lEJZNa EzpVspxvYz4NrReDR91qRLxhJNDOuPk0jfwu0OqHa2gQFMRz6OI9Ld8/ZTtCXmQztLuXo5v58hq QqLHmyszaugxr6sqmIHxPYevONL9b/Z8nZGOjp+h3bQawrAstjtZzHEXHDo5s26EpYJA= X-Received: by 2002:a05:622a:1486:b0:343:6d3f:2fce with SMTP id t6-20020a05622a148600b003436d3f2fcemr28517824qtx.171.1663078883764; Tue, 13 Sep 2022 07:21:23 -0700 (PDT) X-Received: by 2002:a05:622a:1486:b0:343:6d3f:2fce with SMTP id t6-20020a05622a148600b003436d3f2fcemr28517790qtx.171.1663078883476; Tue, 13 Sep 2022 07:21:23 -0700 (PDT) Received: from localhost.localdomain (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id bl4-20020a05620a1a8400b006ce30a5f892sm5530567qkb.102.2022.09.13.07.21.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Sep 2022 07:21:22 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [committed] c++: remove single-parameter version of mark_used Date: Tue, 13 Sep 2022 10:21:18 -0400 Message-Id: <20220913142118.3183120-1-ppalka@redhat.com> X-Mailer: git-send-email 2.37.3.542.gdd3f6c4cae MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-14.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE 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.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Patrick Palka via Gcc-patches From: Patrick Palka Reply-To: Patrick Palka Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1743864668557450955?= X-GMAIL-MSGID: =?utf-8?q?1743864668557450955?= Tested on x86_64-pc-linux-gnu, committed to trunk as obvious. gcc/cp/ChangeLog: * cp-tree.h (mark_used): Remove single-parameter overload. Add default argument to the two-parameter overload. * decl2.cc (mark_used): Likewise. --- gcc/cp/cp-tree.h | 4 ++-- gcc/cp/decl2.cc | 8 +------- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index 1eb176d4a50..f19ecafc266 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -6945,8 +6945,8 @@ extern bool decl_constant_var_p (tree); extern bool decl_maybe_constant_var_p (tree); extern void no_linkage_error (tree); extern void check_default_args (tree); -extern bool mark_used (tree); -extern bool mark_used (tree, tsubst_flags_t); +extern bool mark_used (tree, + tsubst_flags_t = tf_warning_or_error); extern bool mark_single_function (tree, tsubst_flags_t); extern void finish_static_data_member_decl (tree, tree, bool, tree, int); extern tree cp_build_parm_decl (tree, tree, tree); diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc index 684a2d06dde..9f18466192f 100644 --- a/gcc/cp/decl2.cc +++ b/gcc/cp/decl2.cc @@ -5575,7 +5575,7 @@ mark_single_function (tree expr, tsubst_flags_t complain) wrong, true otherwise. */ bool -mark_used (tree decl, tsubst_flags_t complain) +mark_used (tree decl, tsubst_flags_t complain /* = tf_warning_or_error */) { /* If we're just testing conversions or resolving overloads, we don't want any permanent effects like forcing functions to be @@ -5817,12 +5817,6 @@ mark_used (tree decl, tsubst_flags_t complain) return true; } -bool -mark_used (tree decl) -{ - return mark_used (decl, tf_warning_or_error); -} - tree vtv_start_verification_constructor_init_function (void) {