From patchwork Sun Mar 17 20:33:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 228318 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 BA0352C00C3 for ; Mon, 18 Mar 2013 07:33:55 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1364157239; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: References:In-Reply-To:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=OF+woOm2y1mXeX6AXAOiPE8Zppk=; b=wnKGXr4VWEF5lrK g330mxzTzQumgdY4ov2iLFFu6iAXRa6JBqJrNKhTaP0ZwNgfokKwRHBBWSEC1L5w 5ybt4WOC1nfizAwO612bCmVZ7DS1cYY5/ca4OCkr6NaKucPu2oXR2ZW+JyWFADdb wkI74VjZAstCyNQmX4H72aD7cAkE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=XHwDRVjo33viKHiXQMQUnTHW4/UuxvWnPaKrQ72KvAjTuQzPgYd5+TtmcY0iNS 2SD7S38DKCcsweoXqzfb9PBZp1lJ43ZS6gRewBnJVkrT3MpksdgUKixDUqmPQlt1 KLjDZO060duV1i+bOUNWSWptfIy/DKCeQ1gfM07bY7ZDM=; Received: (qmail 3253 invoked by alias); 17 Mar 2013 20:33:43 -0000 Received: (qmail 3244 invoked by uid 22791); 17 Mar 2013 20:33:41 -0000 X-SWARE-Spam-Status: No, hits=-8.4 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, RP_MATCHES_RCVD, SPF_HELO_PASS, TW_SV 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; Sun, 17 Mar 2013 20:33:32 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2HKXWko012493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 17 Mar 2013 16:33:32 -0400 Received: from [10.3.113.56] (ovpn-113-56.phx2.redhat.com [10.3.113.56]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2HKXVRR006670 for ; Sun, 17 Mar 2013 16:33:32 -0400 Message-ID: <5146289B.4070802@redhat.com> Date: Sun, 17 Mar 2013 16:33:31 -0400 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:21.0) Gecko/20100101 Thunderbird/21.0a2 MIME-Version: 1.0 To: gcc-patches List Subject: Re: C++ PATCH for c++/17232 (abstract class, array and sfinae) References: <5144CA1F.8060605@redhat.com> In-Reply-To: <5144CA1F.8060605@redhat.com> 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 On 03/16/2013 03:38 PM, Jason Merrill wrote: > In SFINAE context, we need to instantiate a class so that we can tell > whether or not is abstract. Doing this in non-SFINAE context caused > problems, so I've made it conditional. But it still causes problems, such as PR 56642. So I've reverted the complete_type change for now. Jason commit 6a0649ab081f34f152517707c84d6be211757029 Author: jason Date: Sun Mar 17 20:32:17 2013 +0000 PR c++/17232 PR c++/56642 * typeck2.c (abstract_virtuals_error_sfinae): Revert complete_type change for now. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@196758 138bc75d-0d04-0410-961f-82ee72b054a4 diff --git a/gcc/cp/typeck2.c b/gcc/cp/typeck2.c index 3bac67c..24b5593 100644 --- a/gcc/cp/typeck2.c +++ b/gcc/cp/typeck2.c @@ -265,10 +265,6 @@ abstract_virtuals_error_sfinae (tree decl, tree type, abstract_class_use use, return 0; type = TYPE_MAIN_VARIANT (type); - /* In SFINAE context, force instantiation. */ - if (!(complain & tf_error)) - complete_type (type); - /* If the type is incomplete, we register it within a hash table, so that we can check again once it is completed. This makes sense only for objects for which we have a declaration or at least a