This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Weak symbols and inline
- From: Paul Smith <paul at mad-scientist dot net>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 27 Feb 2014 15:10:43 -0500
- Subject: Re: Weak symbols and inline
- Authentication-results: sourceware.org; auth=none
- References: <1393527190 dot 2823 dot 515 dot camel at pdsdesk> <alpine dot DEB dot 2 dot 10 dot 1402272019340 dot 3594 at laptop-mg dot saclay dot inria dot fr> <1393529487 dot 2823 dot 520 dot camel at pdsdesk> <alpine dot DEB dot 2 dot 10 dot 1402272035200 dot 3594 at laptop-mg dot saclay dot inria dot fr>
- Reply-to: paul at mad-scientist dot net
On Thu, 2014-02-27 at 20:40 +0100, Marc Glisse wrote:
> On Thu, 27 Feb 2014, Paul Smith wrote:
>
> > The function I'm inlining is actually global operator new. It's not
> > legal to declare it static or in a namespace.
>
> It is also explicitly illegal to mark it inline ;-)
???
It works fine in all the compilers I've tested (GCC, clang, MSVC 2010),
and I've seen tons of examples of doing this all over and no one has
mentioned that it is technically illegal.
Do you have a reference to the standard on this?