|
From: | John W. Eaton |
Subject: | Re: symtab.h: why so many function bodies |
Date: | Thu, 25 Feb 2016 16:30:13 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 |
On 02/24/2016 12:24 PM, Rik wrote:
My guess is that the the linker symbol table is crowded with a bunch of functions that are never called outside of a single translation unit (static file scope). This increases the sizes of the object files and probably makes the linker work a bit harder to read, but never use, these definitions.
If that's true, then I think just making those functions static (if they are just plain old functions) should be sufficient.
For member functions of a class that has a public interface, I think visibility would need to be defined for functions that are not actually needed outside of a single file. But we currently only tag entire classes, not individual methods (if that is even possible, I haven't checked).
jwe
[Prev in Thread] | Current Thread | [Next in Thread] |