< prev index next >

src/hotspot/share/utilities/globalDefinitions_xlc.hpp

Print this page
rev 49243 : 8199698: Change 8199275 breaks template instantiation for xlC (and potentially other compliers)

@@ -150,9 +150,20 @@
 #ifndef USE_LIBRARY_BASED_TLS_ONLY
 #define THREAD_LOCAL_DECL __thread
 #endif
 
 // Inlining support
-#define NOINLINE
-#define ALWAYSINLINE inline __attribute__((always_inline))
+//
+// Be aware that for function/method declarations, xlC only supports the following
+// syntax (i.e. the attribute must be placed AFTER the function/method declarator):
+//
+//   void* operator new(size_t size) throw() NOINLINE;
+//
+// For function/method defintions, the more common placement BEFORE the
+// function/method declarator seems to be supported as well:
+//
+//   NOINLINE void* CHeapObj<F>::operator new(size_t size) throw() {...}
+
+#define NOINLINE     __attribute__((__noinline__))
+#define ALWAYSINLINE inline __attribute__((__always_inline__))
 
 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_XLC_HPP
< prev index next >