This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __MATH_INLINE - __extern_inline or __extern_always_inline?


On Sun, Apr 15, 2012 at 02:04:25PM +0200, Marek Polacek wrote:
> --- libc/misc/sys/cdefs.h.mp	2012-04-15 13:32:42.577179773 +0200
> +++ libc/misc/sys/cdefs.h	2012-04-15 13:59:38.727694078 +0200
[ ... ]

And now proper version of the patch...

--- libc/misc/sys/cdefs.h.mp	2012-04-15 13:32:42.577179773 +0200
+++ libc/misc/sys/cdefs.h	2012-04-15 20:16:42.708452983 +0200
@@ -309,26 +309,23 @@
 # define __always_inline __inline
 #endif
 
+/* This tells the debugger to not step through the inlined instructions.  */
+#if __GNUC_PREREQ (4,3)
+# define __attribute_artificial__ __attribute__ ((__artificial__))
+#else
+# define __attribute_artificial__ /* Ignore */
+#endif
+
 /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
    inline semantics, unless -fgnu89-inline is used.  */
 #if !defined __cplusplus || __GNUC_PREREQ (4,3)
 # if defined __GNUC_STDC_INLINE__ || defined __cplusplus
 #  define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
-#  if __GNUC_PREREQ (4,3)
-#   define __extern_always_inline \
-  extern __always_inline __attribute__ ((__gnu_inline__, __artificial__))
-#  else
-#   define __extern_always_inline \
+#  define __extern_always_inline \
   extern __always_inline __attribute__ ((__gnu_inline__))
-#  endif
 # else
 #  define __extern_inline extern __inline
-#  if __GNUC_PREREQ (4,3)
-#   define __extern_always_inline \
-  extern __always_inline __attribute__ ((__artificial__))
-#  else
-#   define __extern_always_inline extern __always_inline
-#  endif
+#  define __extern_always_inline extern __always_inline
 # endif
 #endif
 
 	Marek


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]