< prev index next >

src/share/vm/utilities/globalDefinitions_gcc.hpp

Print this page

        

*** 261,281 **** // Portability macros #define PRAGMA_INTERFACE #pragma interface #define PRAGMA_IMPLEMENTATION #pragma implementation #define VALUE_OBJ_CLASS_SPEC - #ifndef ATTRIBUTE_PRINTF // Diagnostic pragmas like the ones defined below in PRAGMA_FORMAT_NONLITERAL_IGNORED // were only introduced in GCC 4.2. Because we have no other possibility to ignore // these warnings for older versions of GCC, we simply don't decorate our printf-style // functions with __attribute__(format) in that case. #if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || (__GNUC__ > 4) #define ATTRIBUTE_PRINTF(fmt,vargs) __attribute__((format(printf, fmt, vargs))) - #else - #define ATTRIBUTE_PRINTF(fmt,vargs) #endif #endif #define PRAGMA_FORMAT_NONLITERAL_IGNORED _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") \ _Pragma("GCC diagnostic ignored \"-Wformat-security\"") #define PRAGMA_FORMAT_IGNORED _Pragma("GCC diagnostic ignored \"-Wformat\"") --- 261,282 ---- // Portability macros #define PRAGMA_INTERFACE #pragma interface #define PRAGMA_IMPLEMENTATION #pragma implementation #define VALUE_OBJ_CLASS_SPEC // Diagnostic pragmas like the ones defined below in PRAGMA_FORMAT_NONLITERAL_IGNORED // were only introduced in GCC 4.2. Because we have no other possibility to ignore // these warnings for older versions of GCC, we simply don't decorate our printf-style // functions with __attribute__(format) in that case. #if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2)) || (__GNUC__ > 4) + #ifndef ATTRIBUTE_PRINTF #define ATTRIBUTE_PRINTF(fmt,vargs) __attribute__((format(printf, fmt, vargs))) #endif + #ifndef ATTRIBUTE_SCANF + #define ATTRIBUTE_SCANF(fmt,vargs) __attribute__((format(scanf, fmt, vargs))) #endif + #endif // gcc version check #define PRAGMA_FORMAT_NONLITERAL_IGNORED _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") \ _Pragma("GCC diagnostic ignored \"-Wformat-security\"") #define PRAGMA_FORMAT_IGNORED _Pragma("GCC diagnostic ignored \"-Wformat\"")
*** 331,336 **** --- 332,341 ---- #if defined(_LP64) && defined(__APPLE__) #define JLONG_FORMAT "%ld" #endif // _LP64 && __APPLE__ + // Inlining support + #define NOINLINE __attribute__ ((noinline)) + #define ALWAYSINLINE inline __attribute__ ((always_inline)) + #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_GCC_HPP
< prev index next >