Functions that should be static

Francois Gouget fgouget at
Sat Dec 20 18:45:42 CST 2008

On Sat, 20 Dec 2008, Christian Costa wrote:
> If you have a class A (with methods implemented in file 1) that inherits from
> another class B (methods in file B).
> The class A may overrides some methods of B which may become unused if B is
> never instanciated and B methods not reused.
> They will be tracked by your script then.
> We could make these functions static or worst remove then but from object
> programming pov is not good.

I don't see any reason not to make the methods of B static, whether 
class A exists or not. Note that 'static' does not prevent a function 
from being called from another object file if you give a pointer to them 
to that other file (as you do with the virtual table).

Also the compiler will not complain that these functions are unused 
because they are indeed used: you take their address.

Francois Gouget <fgouget at>    
          The last time religion ruled, it was called the dark ages.

More information about the wine-devel mailing list