From patchwork Fri Sep 21 19:51:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Polacek X-Patchwork-Id: 973408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-486161-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="n77Wfk9h"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42H43r2bP0z9sCS for ; Sat, 22 Sep 2018 05:51:34 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=SmTMkgrO62PUI56KY6YbXwOlamFiIcloh8rs6iDAaCAWfrebNOLpQ if2KpQG9ckCYPj0yd1TBQ5gGXiJWQ1kz/5p0G6JgfdvmXOW2lOMUHFgS1KA4HJSP YWURX6xAZxkNYOHlXHqJ7c+zw7y59XxKVSBA2Ao9bMdZIibEGDqkmw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=hz1LZPEnSTslYalFKSGxnBA+5Zc=; b=n77Wfk9hBiwO5sxQcFp6 K4x2zgNiE7l+bauFAaVDcYSSTnIs+0Cykusp7HEDZdTAk5a0J3NcjmvTQQ+xXMyn 3bLA8noVszMyn3YdV+19sFBMJrU/WTvGeDXnzIsv7JJ9RGjA9TBjRe8Mk2CwgPox Zz4a+Ffv9GqmzOvPLs4wliE= Received: (qmail 39706 invoked by alias); 21 Sep 2018 19:51:24 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 39583 invoked by uid 89); 21 Sep 2018 19:51:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=sk:perform, UD:cp-tree.h, cptreeh, cp-tree.h X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 21 Sep 2018 19:51:22 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DDF78308A941 for ; Fri, 21 Sep 2018 19:51:20 +0000 (UTC) Received: from redhat.com (ovpn-120-207.rdu2.redhat.com [10.10.120.207]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6CC3487E22; Fri, 21 Sep 2018 19:51:20 +0000 (UTC) Date: Fri, 21 Sep 2018 15:51:18 -0400 From: Marek Polacek To: GCC Patches , Jason Merrill Subject: C++ PATCH: trivial cleanup Message-ID: <20180921195118.GA5587@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Use the proper type for "complain". I guess it's obvious, but anyway, bootstrapped/regtested on x86_64-linux, ok for trunk? 2018-09-21 Marek Polacek * cp-tree.h (build_noexcept_spec, add_exception_specifier): Adjust declarations. * except.c (build_noexcept_spec): Change the type of the complain parameter to tsubst_flags_t. * typeck2.c (add_exception_specifier): Likewise. diff --git gcc/cp/cp-tree.h gcc/cp/cp-tree.h index 2203e92dda8..efbdad83966 100644 --- gcc/cp/cp-tree.h +++ gcc/cp/cp-tree.h @@ -6461,7 +6461,7 @@ extern void perform_deferred_noexcept_checks (void); extern bool nothrow_spec_p (const_tree); extern bool type_noexcept_p (const_tree); extern bool type_throw_all_p (const_tree); -extern tree build_noexcept_spec (tree, int); +extern tree build_noexcept_spec (tree, tsubst_flags_t); extern void choose_personality_routine (enum languages); extern tree build_must_not_throw_expr (tree,tree); extern tree eh_type_info (tree); @@ -7415,7 +7415,7 @@ extern tree build_x_arrow (location_t, tree, tsubst_flags_t); extern tree build_m_component_ref (tree, tree, tsubst_flags_t); extern tree build_functional_cast (tree, tree, tsubst_flags_t); -extern tree add_exception_specifier (tree, tree, int); +extern tree add_exception_specifier (tree, tree, tsubst_flags_t); extern tree merge_exception_specifiers (tree, tree); /* in mangle.c */ diff --git gcc/cp/except.c gcc/cp/except.c index 2db90eedcf7..3449b59b3cc 100644 --- gcc/cp/except.c +++ gcc/cp/except.c @@ -1187,7 +1187,7 @@ type_throw_all_p (const_tree type) constant-expression of EXPR. COMPLAIN is as for tsubst. */ tree -build_noexcept_spec (tree expr, int complain) +build_noexcept_spec (tree expr, tsubst_flags_t complain) { /* This isn't part of the signature, so don't bother trying to evaluate it until instantiation. */ diff --git gcc/cp/typeck2.c gcc/cp/typeck2.c index b13ed2660de..fec1db00ca4 100644 --- gcc/cp/typeck2.c +++ gcc/cp/typeck2.c @@ -2215,7 +2215,7 @@ build_functional_cast (tree exp, tree parms, tsubst_flags_t complain) know what we're doing. */ tree -add_exception_specifier (tree list, tree spec, int complain) +add_exception_specifier (tree list, tree spec, tsubst_flags_t complain) { bool ok; tree core = spec;