[Issue 19570] pragma(inline) is emitting symbols
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 6 06:15:20 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=19570
--- Comment #8 from Walter Bright <bugzilla at digitalmars.com> ---
(In reply to Manu from comment #7)
> - emit a copy of the function to each CU it's called from
But then it's going to be doing code gen for each of them over and over.
> - not emit the function to the CU it's declared (unless it's called, as
> above)
> - mark the function with 'internal' linkage (what C++ calls 'static') so
> it's not in the object's exported symbol table.
So what if it's in the symbol table?
> - symbol is not externally linkable
Why not?
> - symbols referenced by an inline function that's never called must NOT cause a link error under any circumstances
This is a linker problem - the linker is supposed to remove unreferenced
functions.
--
More information about the Digitalmars-d-bugs
mailing list