From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16142 invoked by alias); 31 Mar 2013 14:41:47 -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 16098 invoked by uid 89); 31 Mar 2013 14:41:40 -0000 X-Spam-SWARE-Status: No, score=-3.6 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD,TW_CX autolearn=ham version=3.3.1 Received: from www.axiomatics.org (HELO mail.axiomatics.org) (66.228.53.191) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Sun, 31 Mar 2013 14:41:37 +0000 Received: by mail.axiomatics.org (Postfix, from userid 1000) id 42144ED51; Sun, 31 Mar 2013 09:41:34 -0500 (CDT) From: Gabriel Dos Reis To: gcc-patches@gcc.gnu.org Subject: Re: C++ PATCH: use C++ semantics for inline functions (defined in headers) In-Reply-To: (Marc Glisse's message of "Sun, 31 Mar 2013 12:01:46 +0200 (CEST)") References: <87a9pnbpq5.fsf@euclid.axiomatics.org> Date: Sun, 31 Mar 2013 14:41:00 -0000 Message-ID: <871uavws0x.fsf@euclid.axiomatics.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2013-03/txt/msg01352.txt.bz2 Marc Glisse writes: | On Thu, 28 Mar 2013, Gabriel Dos Reis wrote: | | > C++ has a much more predictable semantics for inline functions, so we no | > longer need to define them (especially in header files) with the | > 'static' specifier. The upshot is that when the compiler fails to | > inline a call in a given translation unit, it keeps only one copy in the | > entire program, instead of multiple copies (as the 'static' specifier | > would have implied.) | > | > With this patch, there is 2K reduction in size for cc1plus. | > Applying to trunk. Tested on an x86_64-suse-linux. | | Hi, | | the size reduction looks nice, should the same be applied throughout the | compiler? Yes, ideally this should be done throught the entire compiler, except for the headers/functions that are still shared with the runtime compiled with a C compiler. | I didn't check if the cxx-conversion branch already does it. No, it does not do it -- at least when I checked. -- Gaby