From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29551 invoked by alias); 20 Feb 2010 18:13:53 -0000 Received: (qmail 29529 invoked by uid 48); 20 Feb 2010 18:13:41 -0000 Date: Sat, 20 Feb 2010 18:13:00 -0000 Message-ID: <20100220181341.29528.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/43127] Inconsistent and odd constructor calls. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "stvwooddell at embarqmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-02/txt/msg02067.txt.bz2 ------- Comment #3 from stvwooddell at embarqmail dot com 2010-02-20 18:13 ------- Scratch that, that's a error from a file that shouldn't even exist. Copied the given code to a clean project and it compiled. So bug, but a miscommunication in that the constructor is being implicitly add so that the original form is trying to pass a anonymous object as a argument to the implicitly added constructor, which is calling the protected typecast operator. Still, that leaves the issue that the following has two different behaviours when they are logically the same. I'm sure this is just a failure on my part to understand the standard, where is that covered? ptr Ret(new object(*this)); return Ret; return Ret(new object(*this)); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43127