C style 'static' functions

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jul 19 10:37:48 PDT 2017


On Wednesday, 19 July 2017 at 15:28:50 UTC, Steven Schveighoffer 
wrote:
> I'm not so sure of that. Private functions still generate 
> symbols. I think in C, there is no symbol (at least in the 
> object file) for static functions or variables.

They generate hidden symbols. That's just how it implements 
private functions in C: you can't do anything else without 
mangling. You probably can't compile two C units into one object 
file if they have static functions with the same name - this 
would require mangling to make two symbols different.


More information about the Digitalmars-d-learn mailing list