From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18825 invoked by alias); 9 Jul 2019 15:17:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 18817 invoked by uid 89); 9 Jul 2019 15:17:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 09 Jul 2019 15:17:14 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AB3482B; Tue, 9 Jul 2019 08:17:12 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.98.39]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 358983F246; Tue, 9 Jul 2019 08:17:12 -0700 (PDT) From: Richard Sandiford To: Martin Sebor Mail-Followup-To: Martin Sebor ,gcc-patches , richard.sandiford@arm.com Cc: gcc-patches Subject: Re: [PATCH 3/3] change class-key of PODs to struct and others to class (PR 61339) References: <946d6823-5eaf-21b7-f456-dd3c4522a8ce@gmail.com> Date: Tue, 09 Jul 2019 15:19:00 -0000 In-Reply-To: <946d6823-5eaf-21b7-f456-dd3c4522a8ce@gmail.com> (Martin Sebor's message of "Mon, 8 Jul 2019 16:02:26 -0600") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-07/txt/msg00709.txt.bz2 Martin Sebor writes: > diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h > index cfc41e1ed86..625d5b17413 100644 > --- a/gcc/cp/cp-tree.h > +++ b/gcc/cp/cp-tree.h > @@ -6428,7 +6428,7 @@ extern tree get_scope_of_declarator (const cp_declarator *); > extern void grok_special_member_properties (tree); > extern bool grok_ctor_properties (const_tree, const_tree); > extern bool grok_op_properties (tree, bool); > -extern tree xref_tag (enum tag_types, tree, tag_scope, bool, bool * = NULL); > +extern tree xref_tag (enum tag_types, tree, tag_scope, bool); > extern tree xref_tag_from_type (tree, tree, tag_scope); > extern void xref_basetypes (tree, tree); > extern tree start_enum (tree, tree, tree, tree, bool, bool *); > diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c > index 005f99a6e15..9accc3d141b 100644 > --- a/gcc/cp/decl.c > +++ b/gcc/cp/decl.c > @@ -14119,7 +14119,7 @@ lookup_and_check_tag (enum tag_types tag_code, tree name, > > static tree > xref_tag_1 (enum tag_types tag_code, tree name, > - tag_scope scope, bool template_header_p, bool *new_p) > + tag_scope scope, bool template_header_p) > { > enum tree_code code; > tree context = NULL_TREE; > @@ -14151,9 +14151,6 @@ xref_tag_1 (enum tag_types tag_code, tree name, > if (t == error_mark_node) > return error_mark_node; > > - /* Let the caller know this is a new type. */ > - *new_p = t == NULL_TREE; > - > if (scope != ts_current && t && current_class_type > && template_class_depth (current_class_type) > && template_header_p) > @@ -14215,7 +14212,6 @@ xref_tag_1 (enum tag_types tag_code, tree name, > scope = ts_current; > } > t = pushtag (name, t, scope); > - *new_p = true; > } > } > else > @@ -14267,13 +14263,11 @@ xref_tag_1 (enum tag_types tag_code, tree name, > > tree > xref_tag (enum tag_types tag_code, tree name, > - tag_scope scope, bool template_header_p, bool *new_p /* = NULL */) > + tag_scope scope, bool template_header_p) > { > bool dummy; > - if (!new_p) > - new_p = &dummy; > bool subtime = timevar_cond_start (TV_NAME_LOOKUP); > - tree ret = xref_tag_1 (tag_code, name, scope, template_header_p, new_p); > + tree ret = xref_tag_1 (tag_code, name, scope, template_header_p); > timevar_cond_stop (TV_NAME_LOOKUP, subtime); > return ret; > } > diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c > index 52af8c0c6d6..d16bf253058 100644 > --- a/gcc/cp/parser.c > +++ b/gcc/cp/parser.c > @@ -28193,8 +28193,6 @@ cp_parser_template_declaration_after_parameters (cp_parser* parser, > member_p, > /*explicit_specialization_p=*/false, > &friend_p); > - // maybe_warn_struct_vs_class (token->location, TREE_TYPE (decl)); > - > pop_deferring_access_checks (); > > /* If this is a member template declaration, let the front Looks like this might have been part of 1/3. OK otherwise. Thanks again for doing this. (I guess a lot of these tags could be removed, but that was just as true before the patch, so it's still a strict improvement.) Richard