From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84597 invoked by alias); 9 Oct 2017 18:09:56 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 84587 invoked by uid 89); 9 Oct 2017 18:09:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=amazed X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Oct 2017 18:09:54 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BEF3156237; Mon, 9 Oct 2017 14:09:52 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Jbpng9krfkAp; Mon, 9 Oct 2017 14:09:52 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id A5AF5560D1; Mon, 9 Oct 2017 14:09:52 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 337FB80372; Mon, 9 Oct 2017 14:09:52 -0400 (EDT) Date: Mon, 09 Oct 2017 18:09:00 -0000 From: Joel Brobecker To: Ulrich Weigand Cc: gdb-patches@sourceware.org Subject: Re: [RFC][13/19] Target FP: Perform Ada fixed-point scaling in target format Message-ID: <20171009180952.xzg36frnnumvkrt5@adacore.com> References: <20171009163008.5svu3sjyeubqaux7@adacore.com> <20171009165830.1607ED83320@oc3748833570.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171009165830.1607ED83320@oc3748833570.ibm.com> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2017-10/txt/msg00232.txt.bz2 > > This is a C++ question, really. Does it make any difference if you > > declare the std::string first, and then only set its contents in > > a second statement? I can't remember the details, but it has to do > > with initialization vs assignment. I _really_ hope that the string > > class is sufficiently well designed that the two are really equivalent > > in practice? > > Huh. Indeed I see worse code when doing the assignment as a separate > statement, at least with GCC 4.8. I'll make sure to use initialization > instead wherever possible. Thanks for pointing this out! Let's wait for people who really know better about C++ to tell us whether it makes a difference. I was amazed as how careful you have to be when using C++ to avoid inefficiencies, but perhaps I am simply being paranoid in this case... That's why I tried to phrase this as a question. -- Joel