summaryrefslogtreecommitdiffstats
path: root/newlib/libc/include/_ansi.h
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/include/_ansi.h')
-rw-r--r--newlib/libc/include/_ansi.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/newlib/libc/include/_ansi.h b/newlib/libc/include/_ansi.h
index 86cb82b35..c5597b30b 100644
--- a/newlib/libc/include/_ansi.h
+++ b/newlib/libc/include/_ansi.h
@@ -34,9 +34,7 @@
#define _BEGIN_STD_C extern "C" {
#define _END_STD_C }
#endif
-#if defined(__GNUC__) && \
- ( (__GNUC__ >= 4) || \
- ( (__GNUC__ >= 3) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 3) ) )
+#if __GNUC_PREREQ (3, 3)
#define _NOTHROW __attribute__ ((nothrow))
#else
#define _NOTHROW throw()
@@ -133,4 +131,14 @@
#define _ELIDABLE_INLINE static __inline__
#endif
+#if __GNUC_PREREQ (3, 1)
+#define _NOINLINE __attribute__ ((__noinline__))
+#define _NOINLINE_STATIC _NOINLINE static
+#else
+/* On non-GNU compilers and GCC prior to version 3.1 the compiler can't be
+ trusted not to inline if it is static. */
+#define _NOINLINE
+#define _NOINLINE_STATIC
+#endif
+
#endif /* _ANSIDECL_H_ */