From d47555510b49d63c6796d203c395edc557ec5a0f Mon Sep 17 00:00:00 2001 From: Andy Grundman Date: Fri, 2 Sep 2016 10:55:37 -0400 Subject: [PATCH] Don't use __attribute__ for Sun C versions older than 5.10 (aka Sun Studio 12 Update 1) --- src/include/c.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/include/c.h b/src/include/c.h index 4ab3f80..39bc654 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -609,6 +609,7 @@ typedef NameData *Name; * GCC: https://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html * GCC: https://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html * Sunpro: https://docs.oracle.com/cd/E18659_01/html/821-1384/gjzke.html + http://www.oracle.com/technetwork/systems/cccompare-137792.html * XLC: http://www-01.ibm.com/support/knowledgecenter/SSGH2K_11.1.0/com.ibm.xlc111.aix.doc/language_ref/function_attributes.html * XLC: http://www-01.ibm.com/support/knowledgecenter/SSGH2K_11.1.0/com.ibm.xlc111.aix.doc/language_ref/type_attrib.html * ---------------- @@ -630,8 +631,8 @@ typedef NameData *Name; #define pg_attribute_printf(f,a) #endif -/* GCC, Sunpro and XLC support aligned, packed and noreturn */ -#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__) +/* GCC, Sun C 5.10+ and XLC support aligned, packed and noreturn */ +#if defined(__GNUC__) || (defined(__SUNPRO_C) && 0x5100 <= __SUNPRO_C) || defined(__IBMC__) #define pg_attribute_aligned(a) __attribute__((aligned(a))) #define pg_attribute_noreturn() __attribute__((noreturn)) #define pg_attribute_packed() __attribute__((packed)) -- 2.8.4 (Apple Git-73)