-# if __GNUC_PREREQ (3,0)
-# define ATTRIBUTE_ALWAYS_INLINE __attribute__ ((always_inline)) inline
-# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+/* __NO_INLINE__: some gcc's do not honor inlining! :( */
+# if __GNUC_PREREQ (3,0) && !defined(__NO_INLINE__)
+# define ALWAYS_INLINE __attribute__ ((always_inline)) inline
+/* I've seen a toolchain where I needed __noinline__ instead of noinline */
+# define NOINLINE __attribute__((__noinline__))
+# if !ENABLE_WERROR
+# define ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+# define ATTRIBUTE_UNUSED_RESULT __attribute__ ((warn_unused_result))
+# else
+# define ATTRIBUTE_DEPRECATED /* n/a */
+# define ATTRIBUTE_UNUSED_RESULT /* n/a */
+# endif