On Mon, Mar 18, 2013 at 04:28:13PM +0000, Jonathan Wakely wrote:
> On 16 March 2013 13:29, Andi Kleen wrote:
> >
> > With inline __attribute__((always_inline)) these functions
> > get inlined even with -O0.
> >
> > I hardcoded the attribute in the header for now, assuming
> > that all compilers that support libstdc++ have attribute
> > always_inline too. If not it would need to be moved
> > as a macro to c++config.h with appropiate ifdefs.
> 
> That should be fine.  I assume __always_inline was chosen rather than
> _GLIBCXX_ALWAYS_INLINE for consistency with glibc?

Using __always_inline as the name of the macro is a bad idea, glibc
headers use that macro already.  Just use something else in public headers
that aren't part of glibc.

        Jakub

Reply via email to