[clever] r450 committed - - More gcc attributes

1 view
Skip to first unread message

cle...@googlecode.com

unread,
Jul 22, 2011, 8:07:51 PM7/22/11
to cleve...@googlegroups.com
Revision: 450
Author: felipensp
Date: Fri Jul 22 17:07:12 2011
Log: - More gcc attributes
http://code.google.com/p/clever/source/detail?r=450

Modified:
/trunk/include/global.h

=======================================
--- /trunk/include/global.h Mon Jan 17 16:59:01 2011
+++ /trunk/include/global.h Fri Jul 22 17:07:12 2011
@@ -44,6 +44,26 @@
# define CLEVER_GCC_VERSION 0
#endif

+/**
+ * Always inline (disregard -O options)
+ */
+#if defined(__GNUC__) && __GNUC__ >= 3
+# define CLEVER_FORCE_INLINE inline __attribute__((always_inline))
+#elif defined(_MSC_VER)
+# define CLEVER_FORCE_INLINE __forceinline
+#else
+# define CLEVER_FORCE_INLINE
+#endif
+
+/**
+ * Attribute for pure function
+ */
+#ifdef __GNUC__
+# define CLEVER_PURE_FUNC __attribute__((pure))
+#else
+# define CLEVER_PURE_FUNC
+#endif
+
/**
* Try to use register to pass parameters
*/

Reply all
Reply to author
Forward
0 new messages