From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21970 invoked by alias); 3 Jul 2005 12:27:17 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 21954 invoked by uid 22791); 3 Jul 2005 12:27:12 -0000 Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.200) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Sun, 03 Jul 2005 12:27:12 +0000 Received: by wproxy.gmail.com with SMTP id i23so568166wra for ; Sun, 03 Jul 2005 05:26:58 -0700 (PDT) Received: by 10.54.33.70 with SMTP id g70mr3019226wrg; Sun, 03 Jul 2005 05:26:58 -0700 (PDT) Received: by 10.54.13.41 with HTTP; Sun, 3 Jul 2005 05:26:58 -0700 (PDT) Message-ID: <5d0f609905070305263875cb57@mail.gmail.com> Date: Sun, 03 Jul 2005 12:27:00 -0000 From: Dirk Jagdmann Reply-To: Dirk Jagdmann To: Jeroen Wijnhout Subject: Re: copy ctor not called Cc: gcc-help@gcc.gnu.org In-Reply-To: <200507022024.10598.Jeroen.Wijnhout@kdemail.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <200507022024.10598.Jeroen.Wijnhout@kdemail.net> X-SW-Source: 2005-07/txt/msg00019.txt.bz2 The behaviour of gcc is standard compliant, since an assignment in the same statement as a variable declaration is always treated by the copy constructor. The mentioned gcc switch -fno-elide-constructors will work, but on other compilers you'll have the same behaviour again. --=20 ---> Dirk Jagdmann ----> http://cubic.org/~doj -----> http://llg.cubic.org