Say that I use say GDC or LDC. I want to declare a routine as public in one compilation unit (.d src file) and be able to access it from other compilation units.

Do I simply declare the routine with the word keyword public before the usual declaration?

Or maybe that is the default, like not using the keyword static with function declarations in C?

My principal question: If I successfully do this, with GCC or LDC, will I be able to get the code for the externally defined short routine expanded inline and fully integrated into the generated code that corresponds to the calling source code? (So no ‘call’ instruction is even found.)

Reply via email to