From patchwork Tue Nov 2 21:04:49 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dodji Seketeli X-Patchwork-Id: 69924 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id CB0B6B70E3 for ; Wed, 3 Nov 2010 08:05:00 +1100 (EST) Received: (qmail 23228 invoked by alias); 2 Nov 2010 21:04:59 -0000 Received: (qmail 23220 invoked by uid 22791); 2 Nov 2010 21:04:58 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 02 Nov 2010 21:04:54 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oA2L4rrs021242 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Nov 2010 17:04:53 -0400 Received: from adjoa.redhat.com ([10.3.113.8]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oA2L4oSk020791; Tue, 2 Nov 2010 17:04:51 -0400 From: Dodji Seketeli To: Jason Merrill Subject: Remove unused tf_no_class_instantiations enum member CC: GCC Patches X-URL: http://www.seketeli.net/~dodji Date: Tue, 02 Nov 2010 22:04:49 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes 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 Hello, This (obvious) patch removes the unused tf_no_class_instantiations enum member that I noticed while working on another patch. OK to commit to trunk? commit d9068b6943761063d7d6cc3af8debefcded37aaa Author: Dodji Seketeli Date: Tue Nov 2 22:00:29 2010 +0100 Remove unused tf_no_class_instantiations enum member gcc/cp/ChangeLog: * cp-tree.h (enum tsubst_flags): Remove. * pt.c (tsubst): Remove the use of tf_no_class_instantiations. diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index b46959b..fc4772d 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -3960,8 +3960,6 @@ enum tsubst_flags { conversion. */ tf_no_access_control = 1 << 7, /* Do not perform access checks, even when issuing other errors. */ - /* Do not instantiate classes (used by count_non_default_template_args). */ - tf_no_class_instantiations = 1 << 8, /* Convenient substitution flags combinations. */ tf_warning_or_error = tf_warning | tf_error }; diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 21366d9..ca2baeb 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -10878,8 +10878,7 @@ tsubst (tree t, tree args, tsubst_flags_t complain, tree in_decl) But, such constructs have already been resolved by this point, so here CTX really should have complete type, unless it's a partial instantiation. */ - if (!(complain & tf_no_class_instantiations)) - ctx = complete_type (ctx); + ctx = complete_type (ctx); if (!COMPLETE_TYPE_P (ctx)) { if (complain & tf_error)