From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76529 invoked by alias); 10 Aug 2015 14:45:40 -0000 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 Received: (qmail 76519 invoked by uid 89); 10 Aug 2015 14:45:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.7 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Aug 2015 14:45:39 +0000 Received: from tsaunders-iceball.corp.tor1.mozilla.com (unknown [66.207.208.102]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id 36942C06B; Mon, 10 Aug 2015 14:45:37 +0000 (UTC) Date: Mon, 10 Aug 2015 14:45:00 -0000 From: Trevor Saunders To: Markus Trippelsdorf Cc: tbsaunde+gcc@tbsaunde.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH 2/2] replace several uses of the anon namespace with GCC_FINAL Message-ID: <20150810144533.GA3700@tsaunders-iceball.corp.tor1.mozilla.com> References: <1439208314-7390-1-git-send-email-tbsaunde+gcc@tbsaunde.org> <1439208314-7390-2-git-send-email-tbsaunde+gcc@tbsaunde.org> <20150810135602.GA403@x4> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150810135602.GA403@x4> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-08/txt/msg00466.txt.bz2 On Mon, Aug 10, 2015 at 03:56:02PM +0200, Markus Trippelsdorf wrote: > On 2015.08.10 at 08:05 -0400, tbsaunde+gcc@tbsaunde.org wrote: > > > > In many places gcc puts classes in the anon namespace so the compiler can tell > > they do not get inheritted from to enable better devirtualization. However > > debugging code in the anon namespace can be a pain, and the same thing can be > > accomplished more directly by marking the classes as final. When bootstrapping > > stage 3 should always be built in C++14 mode now, and of course will always be > > newer than gcc 4.7, so these classes will always be marked as final there. > > AIUI cross compilers are supposed to be built with recent gcc, which I would > > tend to think implies newer than 4.7, so they should also be built with these > > classes marked as final. I believe that means in all important cases this works just as well as the anon namespace. > > > > bootstrapped + regtested on x86_64-linux-gnu, ok? > > Are you sure that you don't unintentionally introduce new ODR > violations? yeah, I just looked at a list of all the class names, and they are all different. So since all the new symbols involve a class name they are all unique. Trev > An LTO bootstrap, where you look for new -Wodr warnings, should give the > answer. > > -- > Markus