[Issue 20925] pragma(inline) should emit code to the calling CU + appropriate linker flags

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jun 13 02:44:48 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20925

--- Comment #4 from Manu <turkeyman at gmail.com> ---
> I do deem the request for linkonce_odr emission into each referencing CU as valid, but it should use another syntax.

Which is why I proposed allowing more fidelity in the argument to the pragma.
Perhaps something like:
  pragma(inline, true) - linkonce
  pragma(inline, always) - strong hint that inlining should occur if possible
  pragma(inline, force) - compile error if inline fails

These map to the 3 distinct use cases I referred to in my forum OP.
What alternative proposal would you suggest for `linkonce`? That's what
'inline' actually means to most native programmers... deviating from that
precedent would likely be _more_ confusing rather than less.

--


More information about the Digitalmars-d-bugs mailing list