From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11064 invoked by alias); 21 Dec 2012 11:38:56 -0000 Received: (qmail 10974 invoked by uid 22791); 21 Dec 2012 11:38:55 -0000 X-SWARE-Spam-Status: No, hits=-4.7 required=5.0 tests=AWL,BAYES_00,FSL_NEW_HELO_USER,KHOP_THREADED,RCVD_IN_HOSTKARMA_NO,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 21 Dec 2012 11:38:50 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id qBLBcmlj002666 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 21 Dec 2012 11:38:49 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id qBLBclQl029598 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 21 Dec 2012 11:38:47 GMT Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id qBLBckq0031080; Fri, 21 Dec 2012 05:38:46 -0600 Received: from [192.168.1.4] (/79.17.189.167) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 21 Dec 2012 03:38:46 -0800 Message-ID: <50D44A43.2080500@oracle.com> Date: Fri, 21 Dec 2012 11:38:00 -0000 From: Paolo Carlini 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> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-12/txt/msg01307.txt.bz2 Hi, On 12/07/2012 06:05 AM, Jason Merrill wrote: > 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. I was looking a bit more into this Bug, and something seems still weird about the testcase in Comment #1 of the audit trail, which we also didn't reject with 4.6.x: class base { protected: base() {} }; class derived : public base { public: derived() : base{} // <-- Note the c++11 curly brace syntax {} }; int main() { derived d1; return 0; } ??? Thanks, Paolo.