This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C++ PATCH: use C++ semantics for inline functions (defined in headers)


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? I didn't check if the cxx-conversion branch already does it.

--
Marc Glisse


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]