Re: Weak symbols and inline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2014-02-28 at 23:05 +0100, Marc Glisse wrote:
> You mean always_inline? Well, it has the advantage that it doesn't
> force the function to be inlined ;-)

Yes, sorry.  But what's wrong with forcing inline? :-).  We're already
well beyond worrying about portability, and into "does it work"-ability.

> > If I don't include the header file, then the code silently falls back to
> > the system new/delete.
> 
> It shouldn't be hard to check if nm -D yourlib.so contains _Znwm as U,
> you can add that to the Makefile.

Yes, I was playing with this.  Pretty straightforward I agree.

> Well, if you control the Makefile, you can actually add -include mynew
> on the command line so it can't be forgotten...

Unfortunately that's much harder to do in a portable way (GNU/Linux,
MacOSX, Windows).  I can run the nm check only on Linux and that should
be good enough, since almost all the code is the same on all three
platforms.





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux