@@ -644,12 +644,13 @@ typedef NameData *Name;
644
644
645
645
646
646
/*
647
- * Forcing a function not to be inlined can be useful if it's the slow-path of
648
- * a performance critical function, or should be visible in profiles to allow
649
- * for proper cost attribution.
647
+ * Forcing a function not to be inlined can be useful if it's the slow path of
648
+ * a performance-critical function, or should be visible in profiles to allow
649
+ * for proper cost attribution. Note that unlike the pg_attribute_XXX macros
650
+ * above, this should be placed before the function's return type and name.
650
651
*/
651
- /* GCC, Sunpro and XLC support noinline via__attribute */
652
- #if defined(__GNUC__ )|| defined(__SUNPRO_C )|| defined(__IBMC__ )
652
+ /* GCC, Sunpro and XLC support noinline via__attribute__ */
653
+ #if ( defined(__GNUC__ ) && __GNUC__ > 2 )|| defined(__SUNPRO_C )|| defined(__IBMC__ )
653
654
#define pg_noinline __attribute__((noinline))
654
655
/* msvc via declspec */
655
656
#elif defined(_MSC_VER )