What does 'inline' mean?

Manu turkeyman at gmail.com
Mon Jun 8 13:52:40 UTC 2020


On Mon, Jun 8, 2020 at 7:10 PM Basile B. via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:

> On Monday, 8 June 2020 at 08:47:36 UTC, Stefan Koch wrote:
> > On Monday, 8 June 2020 at 08:45:02 UTC, Basile B. wrote:
> >
> >> what if the function address is took in a delegate ?
> >> It still needs to be there, in the object matching to the CU
> >> where it is declared, otherwise there will be surprises, e.g
> >> &func in a CU and &func in another will have different
> >> addresses.
> >
> > I have _never_ compared addresses of inline functions from
> > different CUs.
> > How would I even do that?
> > by storing the function pointer in a global which is visible
> > from multiple translation units?
> > Is that a valid concern?
> > Will _any_ project out there break because of that?
>
> It's a detail. I just meant that in case where the address of
> function that is marked for inlining is took then it must still
> be emitted in the object matching to the declaration unit.
>

It should be emit to the CU where the address is taken.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20200608/7310d9e7/attachment-0001.htm>


More information about the Digitalmars-d mailing list