From patchwork Fri Dec 7 09:13:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 204436 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 D52F72C0040 for ; Fri, 7 Dec 2012 20:14:23 +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=1355476465; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=BiBhlHc82n7GVJFnygNJ w1fuT0g=; b=iVqQf5XmrU7uyxC+onVOjprNQRdJAMRjLl+d/kkrqoE1VFK24xI9 VFWGnwRrXG6iu7MrsqBx+APOMJjxnACKVXAmIGNsO1WNWiK13ZXPlZTAnVh0Mn9E 6gI9HnVGM3ydlsu1GGlATuC/cewjExk8/EIZN4xuw27oYa00X4ooR9Y= 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:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=RkexCIcvjBJX8w9On2Px+FH70muYsBtUKoVtoTBu9r64V2GPFhlXux/VyMk/Td rT6Lth55WQA2IFYlmpEvVkE1aiNy0fGUd8fnWU+uO+zipcuW+5pkcABCb6MGqYKa uL/87cC7ywejStNdGg6kK3H8PKRNKu2cqA9CWbv4tOuHs=; Received: (qmail 17019 invoked by alias); 7 Dec 2012 09:13:21 -0000 Received: (qmail 16969 invoked by uid 22791); 7 Dec 2012 09:13:20 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from youngberry.canonical.com (HELO youngberry.canonical.com) (91.189.89.112) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 07 Dec 2012 09:13:15 +0000 Received: from dslb-088-073-097-000.pools.arcor-ip.net ([88.73.97.0] helo=[192.168.42.216]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Tgtzd-0000hA-BS; Fri, 07 Dec 2012 09:13:13 +0000 Message-ID: <50C1B327.9060006@ubuntu.com> Date: Fri, 07 Dec 2012 10:13:11 +0100 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Jason Merrill CC: gcc-patches List Subject: Re: C++ PATCH for c++/54325 (wrong error initializing abstract base class) References: <50C1790B.3040704@redhat.com> In-Reply-To: <50C1790B.3040704@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 Am 07.12.2012 06:05, schrieb Jason Merrill: > It's perfectly OK to initialize a base class of abstract type; it's only an > error to create a full object of such a type. So this patch moves the check > from more generic initialization code out into a function that's definitely > creating a new object. > > Tested x86_64-pc-linux-gnu, applying to trunk and 4.7. this doesn't build on the branch: ../gcc/cp/tree.c: In function 'build_aggr_init_expr': ../gcc/cp/tree.c:399:1: error: parameter name omitted this fixes the bootstrap, currently running the testsuite. --- cp/tree.c~ 2012-12-07 10:01:16.665415647 +0100 +++ cp/tree.c 2012-12-07 10:11:01.373410862 +0100 @@ -396,7 +396,8 @@ callable. */ tree -build_aggr_init_expr (tree type, tree init, tsubst_flags_t /*complain*/) +build_aggr_init_expr (tree type, tree init, + tsubst_flags_t complain ATTRIBUTE_UNUSED) { tree fn; tree slot;