[runtime] Use double-underscored attributes.
authorJon Purdy <evincarofautumn@gmail.com>
Thu, 2 Feb 2017 23:42:45 +0000 (15:42 -0800)
committerJon Purdy <evincarofautumn@gmail.com>
Fri, 3 Feb 2017 21:33:47 +0000 (13:33 -0800)
E.g., 'aligned' => '__aligned__'. We use the following attributes:

 * aligned
 * always_inline
 * cold
 * deprecated
 * error
 * format
 * naked
 * noinline
 * packed
 * printf
 * tls_model
 * unavailable
 * used
 * visibility
 * warn_unused_result

15 files changed:
mono/arch/s390x/s390x-codegen.h
mono/btls/btls-util.h
mono/metadata/sgen-client-mono.h
mono/mini/mini-arm64.c
mono/mini/mini-runtime.c
mono/mini/mini-s390x.c
mono/sgen/sgen-protocol.h
mono/tests/libtest.c
mono/utils/atomic.c
mono/utils/mono-compiler.h
mono/utils/mono-hwcap-s390x.c
mono/utils/mono-publib.h
mono/utils/mono-signal-handler.h
mono/utils/mono-tls.c
mono/utils/valgrind.h

index 97db6ce6eb9a711c5a3da86e2c7c668630d85594..880eca2201cef39089aaac9d256265e4cd9a3de9 100644 (file)
@@ -268,7 +268,7 @@ typedef struct {
        char    xx : 4;
        char    r3 : 4;
        char    r4 : 4;
-} __attribute__ ((packed)) RRD_Format;
+} __attribute__ ((__packed__)) RRD_Format;
 
 typedef struct {
        short   op;
@@ -346,7 +346,7 @@ typedef struct {
        int     b2 : 4;
        int     d2 : 20;
        char    op2;
-} __attribute__ ((packed)) RXY_Format;
+} __attribute__ ((__packed__)) RXY_Format;
 
 typedef struct {
        char    op;
@@ -381,7 +381,7 @@ typedef struct {
        short   dl2 : 12;
        char    dh2;
        char    op2;
-} __attribute__ ((packed)) RSY_Format_1;
+} __attribute__ ((__packed__)) RSY_Format_1;
 
 typedef struct {
        char    op1;
@@ -391,7 +391,7 @@ typedef struct {
        short   dl2 : 12;
        char    dh2;
        char    op2;
-} __attribute__ ((packed)) RSY_Format_2;
+} __attribute__ ((__packed__)) RSY_Format_2;
 
 typedef struct {
        char    op1;
@@ -401,21 +401,21 @@ typedef struct {
        short   d1 : 12;
        char    yy;
        char    op2;
-} __attribute__ ((packed)) RSL_Format;
+} __attribute__ ((__packed__)) RSL_Format;
 
 typedef struct {
        char    op;
        char    r1 : 4;
        char    r3 : 4;
        short   i2;
-} __attribute__ ((packed)) RSI_Format;
+} __attribute__ ((__packed__)) RSI_Format;
 
 typedef struct {
        char    op1;
        char    m1 : 4;
        char    op2 : 4;
        short   i2;
-} __attribute__ ((packed)) RI_Format;
+} __attribute__ ((__packed__)) RI_Format;
 
 typedef struct {
        char    op1;
@@ -424,7 +424,7 @@ typedef struct {
        short   i2;
        char    xx;
        char    op2;
-} __attribute__ ((packed)) RIE_Format_1;
+} __attribute__ ((__packed__)) RIE_Format_1;
 
 typedef struct {
        char    op1;
@@ -434,7 +434,7 @@ typedef struct {
        char    m2 : 4;
        char    xx : 4;
        char    op2;
-} __attribute__ ((packed)) RIE_Format_2;
+} __attribute__ ((__packed__)) RIE_Format_2;
 
 typedef struct {
        char    op1;
@@ -443,7 +443,7 @@ typedef struct {
        short   d;
        char    i;
        char    op2;
-} __attribute__ ((packed)) RIE_Format_3;
+} __attribute__ ((__packed__)) RIE_Format_3;
 
 typedef struct {
        char    op1;
@@ -453,7 +453,7 @@ typedef struct {
        char    m3 : 4;
        char    xx : 4;
        char    op2;
-} __attribute__ ((packed)) RIE_Format_4;
+} __attribute__ ((__packed__)) RIE_Format_4;
 
 typedef struct {
        char    op1;
@@ -462,7 +462,7 @@ typedef struct {
        short   ri2;
        char    xx;
        char    op2;
-} __attribute__ ((packed)) RIE_Format_5;
+} __attribute__ ((__packed__)) RIE_Format_5;
 
 typedef struct {
        char    op1;
@@ -472,7 +472,7 @@ typedef struct {
        char    i4;
        char    i5;
        char    op2;
-} __attribute__ ((packed)) RIE_Format_6;
+} __attribute__ ((__packed__)) RIE_Format_6;
 
 typedef struct {
        char    op1;
@@ -481,7 +481,7 @@ typedef struct {
        short   i2;
        char    xx;
        char    op2;
-} __attribute__ ((packed)) RIE_Format_7;
+} __attribute__ ((__packed__)) RIE_Format_7;
 
 typedef struct {
        char    op1;
@@ -491,21 +491,21 @@ typedef struct {
        int     d4 : 12;
        char    i2;
        char    op2;
-} __attribute__ ((packed)) RIS_Format;
+} __attribute__ ((__packed__)) RIS_Format;
 
 typedef struct {
        char    op1;
        char    r1 : 4;
        char    op2 : 4;
        int     i2;
-} __attribute__ ((packed)) RIL_Format_1;
+} __attribute__ ((__packed__)) RIL_Format_1;
 
 typedef struct {
        char    op1;
        char    m1 : 4;
        char    op2 : 4;
        int     i2;
-} __attribute__ ((packed)) RIL_Format_2;
+} __attribute__ ((__packed__)) RIL_Format_2;
 
 typedef struct {
        short   op1;
@@ -516,21 +516,21 @@ typedef struct {
        char    m3 : 4;
        char    xx : 4;
        char    op2;
-} __attribute__ ((packed)) RXE_Format;
+} __attribute__ ((__packed__)) RXE_Format;
 
 typedef struct {
        char    op;
        char    i2;
        short   b1 : 4;
        short   d1 : 12;
-} __attribute__ ((packed)) SI_Format;
+} __attribute__ ((__packed__)) SI_Format;
 
 typedef struct {
        short   op;
        char    b1 : 4;
        short   d1 : 12;
        short   i2;
-} __attribute__ ((packed)) SIL_Format;
+} __attribute__ ((__packed__)) SIL_Format;
 
 typedef struct {
        char    op1;
@@ -538,7 +538,7 @@ typedef struct {
        char    b1 : 4;
        int     d1 : 20;
        char    op2;
-} __attribute__ ((packed)) SIY_Format;
+} __attribute__ ((__packed__)) SIY_Format;
 
 typedef struct {
        char    op1;
@@ -547,13 +547,13 @@ typedef struct {
        short   b3 : 4;
        short   d3 : 12;
        short   ri2;
-} __attribute__ ((packed)) SMI_Format;
+} __attribute__ ((__packed__)) SMI_Format;
 
 typedef struct {
        short   op;
        short   b2 : 4;
        short   d2 : 12;
-} __attribute__ ((packed)) S_Format;
+} __attribute__ ((__packed__)) S_Format;
 
 typedef struct {
        char    op;
@@ -562,7 +562,7 @@ typedef struct {
        short   d1 : 12;
        short   b2 : 4;
        short   d2 : 12;
-} __attribute__ ((packed)) SS_Format_1;
+} __attribute__ ((__packed__)) SS_Format_1;
 
 typedef struct {
        char    op;
@@ -572,7 +572,7 @@ typedef struct {
        short   d1 : 12;
        short   b2 : 4;
        short   d2 : 12;
-} __attribute__ ((packed)) SS_Format_2;
+} __attribute__ ((__packed__)) SS_Format_2;
 
 typedef struct {
        char    op;
@@ -582,7 +582,7 @@ typedef struct {
        short   d1 : 12;
        short   b2 : 4;
        short   d2 : 12;
-} __attribute__ ((packed)) SS_Format_3;        
+} __attribute__ ((__packed__)) SS_Format_3;    
 
 typedef struct {
        char    op;
@@ -592,7 +592,7 @@ typedef struct {
        short   d2 : 12;
        short   b4 : 4;
        short   d4 : 12;
-} __attribute__ ((packed)) SS_Format_4;        
+} __attribute__ ((__packed__)) SS_Format_4;    
 
 typedef struct {
        short   op;
@@ -600,7 +600,7 @@ typedef struct {
        short   d1 : 12;
        short   b2 : 4;
        short   d2 : 12;
-} __attribute__ ((packed)) SSE_Format;
+} __attribute__ ((__packed__)) SSE_Format;
 
 typedef struct {
        short   op;
@@ -610,7 +610,7 @@ typedef struct {
        short   d1 : 12;
        short   b2 : 4;
        short   d2 : 12;
-} __attribute__ ((packed)) SSF_Format;
+} __attribute__ ((__packed__)) SSF_Format;
 
 typedef struct {
        short   op1;
@@ -620,7 +620,7 @@ typedef struct {
        char    m3 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRIa_Format;
+} __attribute__ ((__packed__)) VRIa_Format;
 
 typedef struct {
        short   op1;
@@ -631,7 +631,7 @@ typedef struct {
        char    m4 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRIb_Format;
+} __attribute__ ((__packed__)) VRIb_Format;
 
 typedef struct {
        short   op1;
@@ -641,7 +641,7 @@ typedef struct {
        char    m4 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRIc_Format;
+} __attribute__ ((__packed__)) VRIc_Format;
 
 typedef struct {
        short   op1;
@@ -653,7 +653,7 @@ typedef struct {
        char    m5 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRId_Format;
+} __attribute__ ((__packed__)) VRId_Format;
 
 typedef struct {
        short   op1;
@@ -664,7 +664,7 @@ typedef struct {
        char    m4 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRIe_Format;
+} __attribute__ ((__packed__)) VRIe_Format;
 
 typedef struct {
        short   op1;
@@ -676,7 +676,7 @@ typedef struct {
        char    m3 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRRa_Format;
+} __attribute__ ((__packed__)) VRRa_Format;
 
 typedef struct {
        short   op1;
@@ -689,7 +689,7 @@ typedef struct {
        char    m4 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRRb_Format;
+} __attribute__ ((__packed__)) VRRb_Format;
 
 typedef struct {
        short   op1;
@@ -702,7 +702,7 @@ typedef struct {
        char    m3 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRRc_Format;
+} __attribute__ ((__packed__)) VRRc_Format;
 
 typedef struct {
        short   op1;
@@ -715,7 +715,7 @@ typedef struct {
        char    v4 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRRd_Format;
+} __attribute__ ((__packed__)) VRRd_Format;
 
 typedef struct {
        short   op1;
@@ -728,7 +728,7 @@ typedef struct {
        char    v4 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRRe_Format;
+} __attribute__ ((__packed__)) VRRe_Format;
 
 typedef struct {
        short   op1;
@@ -738,7 +738,7 @@ typedef struct {
        short   xx;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRRf_Format;
+} __attribute__ ((__packed__)) VRRf_Format;
 
 typedef struct {
        short   op1;
@@ -749,7 +749,7 @@ typedef struct {
        char    m4 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRSa_Format;
+} __attribute__ ((__packed__)) VRSa_Format;
 
 typedef struct {
        short   op1;
@@ -760,7 +760,7 @@ typedef struct {
        char    m4 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRSb_Format;
+} __attribute__ ((__packed__)) VRSb_Format;
 
 typedef struct {
        short   op1;
@@ -771,7 +771,7 @@ typedef struct {
        char    m4 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRSc_Format;
+} __attribute__ ((__packed__)) VRSc_Format;
 
 typedef struct {
        short   op1;
@@ -782,7 +782,7 @@ typedef struct {
        char    m3 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRV_Format;
+} __attribute__ ((__packed__)) VRV_Format;
 
 typedef struct {
        short   op1;
@@ -793,7 +793,7 @@ typedef struct {
        char    m3 : 4;
        char    rxb : 4;
        char    op2;
-} __attribute__ ((packed)) VRX_Format;
+} __attribute__ ((__packed__)) VRX_Format;
 
 #define s390_emit16(c, x) do                   \
 {                                              \
index a1b165235bd50eca05375db37681b9558f3dc89a..cad0920391dc404a2f62f0acbc12c31d44b2ce76 100644 (file)
@@ -22,7 +22,7 @@
 #else
 
 #ifdef __GNUC__
-#define MONO_API __attribute__ ((visibility ("default")))
+#define MONO_API __attribute__ ((__visibility__ ("default")))
 #else
 #define MONO_API
 #endif
index 6db0af190c966aa2c3883a15756546abb5bd07e2..836c1143d7a15631baeb4562281136a4fd0e9a5a 100644 (file)
@@ -112,7 +112,7 @@ sgen_mono_array_size (GCVTable vtable, MonoArray *array, mword *bounds_size, mwo
 #define SGEN_CLIENT_OBJECT_HEADER_SIZE         (sizeof (GCObject))
 #define SGEN_CLIENT_MINIMUM_OBJECT_SIZE                SGEN_CLIENT_OBJECT_HEADER_SIZE
 
-static mword /*__attribute__((noinline)) not sure if this hint is a good idea*/
+static mword /*__attribute__ ((__noinline__)) not sure if this hint is a good idea*/
 sgen_client_slow_object_get_size (GCVTable vtable, GCObject* o)
 {
        MonoClass *klass = ((MonoVTable*)vtable)->klass;
index 200036dddd50f7a5c22bdd7e8181fca577fab4d6..3ad91e31cd0dda930ff1206ef5690d9c1971b896 100644 (file)
@@ -53,7 +53,7 @@ static gpointer bp_trampoline;
 
 static gboolean ios_abi;
 
-static __attribute__((warn_unused_result)) guint8* emit_load_regset (guint8 *code, guint64 regs, int basereg, int offset);
+static __attribute__ ((__warn_unused_result__)) guint8* emit_load_regset (guint8 *code, guint64 regs, int basereg, int offset);
 
 const char*
 mono_arch_regname (int reg)
@@ -328,7 +328,7 @@ emit_imm64_template (guint8 *code, int dreg)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_addw_imm (guint8 *code, int dreg, int sreg, int imm)
 {
        if (!arm_is_arith_imm (imm)) {
@@ -340,7 +340,7 @@ emit_addw_imm (guint8 *code, int dreg, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_addx_imm (guint8 *code, int dreg, int sreg, int imm)
 {
        if (!arm_is_arith_imm (imm)) {
@@ -352,7 +352,7 @@ emit_addx_imm (guint8 *code, int dreg, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_subw_imm (guint8 *code, int dreg, int sreg, int imm)
 {
        if (!arm_is_arith_imm (imm)) {
@@ -364,7 +364,7 @@ emit_subw_imm (guint8 *code, int dreg, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_subx_imm (guint8 *code, int dreg, int sreg, int imm)
 {
        if (!arm_is_arith_imm (imm)) {
@@ -377,7 +377,7 @@ emit_subx_imm (guint8 *code, int dreg, int sreg, int imm)
 }
 
 /* Emit sp+=imm. Clobbers ip0/ip1 */
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_addx_sp_imm (guint8 *code, int imm)
 {
        code = emit_imm (code, ARMREG_IP0, imm);
@@ -388,7 +388,7 @@ emit_addx_sp_imm (guint8 *code, int imm)
 }
 
 /* Emit sp-=imm. Clobbers ip0/ip1 */
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_subx_sp_imm (guint8 *code, int imm)
 {
        code = emit_imm (code, ARMREG_IP0, imm);
@@ -398,7 +398,7 @@ emit_subx_sp_imm (guint8 *code, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_andw_imm (guint8 *code, int dreg, int sreg, int imm)
 {
        // FIXME:
@@ -408,7 +408,7 @@ emit_andw_imm (guint8 *code, int dreg, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_andx_imm (guint8 *code, int dreg, int sreg, int imm)
 {
        // FIXME:
@@ -418,7 +418,7 @@ emit_andx_imm (guint8 *code, int dreg, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_orrw_imm (guint8 *code, int dreg, int sreg, int imm)
 {
        // FIXME:
@@ -428,7 +428,7 @@ emit_orrw_imm (guint8 *code, int dreg, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_orrx_imm (guint8 *code, int dreg, int sreg, int imm)
 {
        // FIXME:
@@ -438,7 +438,7 @@ emit_orrx_imm (guint8 *code, int dreg, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_eorw_imm (guint8 *code, int dreg, int sreg, int imm)
 {
        // FIXME:
@@ -448,7 +448,7 @@ emit_eorw_imm (guint8 *code, int dreg, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_eorx_imm (guint8 *code, int dreg, int sreg, int imm)
 {
        // FIXME:
@@ -458,7 +458,7 @@ emit_eorx_imm (guint8 *code, int dreg, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_cmpw_imm (guint8 *code, int sreg, int imm)
 {
        if (imm == 0) {
@@ -472,7 +472,7 @@ emit_cmpw_imm (guint8 *code, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_cmpx_imm (guint8 *code, int sreg, int imm)
 {
        if (imm == 0) {
@@ -486,7 +486,7 @@ emit_cmpx_imm (guint8 *code, int sreg, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_strb (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_strb_imm (imm)) {
@@ -500,7 +500,7 @@ emit_strb (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_strh (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_strh_imm (imm)) {
@@ -514,7 +514,7 @@ emit_strh (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_strw (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_strw_imm (imm)) {
@@ -528,7 +528,7 @@ emit_strw (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_strfpw (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_strw_imm (imm)) {
@@ -542,7 +542,7 @@ emit_strfpw (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_strfpx (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_strx_imm (imm)) {
@@ -556,7 +556,7 @@ emit_strfpx (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_strx (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_strx_imm (imm)) {
@@ -570,7 +570,7 @@ emit_strx (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_ldrb (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_pimm12_scaled (imm, 1)) {
@@ -584,7 +584,7 @@ emit_ldrb (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_ldrsbx (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_pimm12_scaled (imm, 1)) {
@@ -598,7 +598,7 @@ emit_ldrsbx (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_ldrh (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_pimm12_scaled (imm, 2)) {
@@ -612,7 +612,7 @@ emit_ldrh (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_ldrshx (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_pimm12_scaled (imm, 2)) {
@@ -626,7 +626,7 @@ emit_ldrshx (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_ldrswx (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_pimm12_scaled (imm, 4)) {
@@ -640,7 +640,7 @@ emit_ldrswx (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_ldrw (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_pimm12_scaled (imm, 4)) {
@@ -653,7 +653,7 @@ emit_ldrw (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_ldrx (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_pimm12_scaled (imm, 8)) {
@@ -666,7 +666,7 @@ emit_ldrx (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_ldrfpw (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_pimm12_scaled (imm, 4)) {
@@ -680,7 +680,7 @@ emit_ldrfpw (guint8 *code, int rt, int rn, int imm)
        return code;
 }
 
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_ldrfpx (guint8 *code, int rt, int rn, int imm)
 {
        if (arm_is_pimm12_scaled (imm, 8)) {
@@ -790,7 +790,7 @@ emit_tls_set (guint8 *code, int sreg, int tls_offset)
  * - ldrp [fp, lr], [sp], !stack_offfset
  * Clobbers TEMP_REGS.
  */
-__attribute__((warn_unused_result)) guint8*
+__attribute__ ((__warn_unused_result__)) guint8*
 mono_arm_emit_destroy_frame (guint8 *code, int stack_offset, guint64 temp_regs)
 {
        arm_movspx (code, ARMREG_SP, ARMREG_FP);
@@ -2854,7 +2854,7 @@ opcode_to_armcond (int opcode)
 }
 
 /* This clobbers LR */
-static inline __attribute__((warn_unused_result)) guint8*
+static inline __attribute__ ((__warn_unused_result__)) guint8*
 emit_cond_exc (MonoCompile *cfg, guint8 *code, int opcode, const char *exc_name)
 {
        int cond;
@@ -4483,7 +4483,7 @@ emit_move_args (MonoCompile *cfg, guint8 *code)
  *   Emit code to store the registers in REGS into the appropriate elements of
  * the register array at BASEREG+OFFSET.
  */
-static __attribute__((warn_unused_result)) guint8*
+static __attribute__ ((__warn_unused_result__)) guint8*
 emit_store_regarray (guint8 *code, guint64 regs, int basereg, int offset)
 {
        int i;
@@ -4510,7 +4510,7 @@ emit_store_regarray (guint8 *code, guint64 regs, int basereg, int offset)
  *   Emit code to load the registers in REGS from the appropriate elements of
  * the register array at BASEREG+OFFSET.
  */
-static __attribute__((warn_unused_result)) guint8*
+static __attribute__ ((__warn_unused_result__)) guint8*
 emit_load_regarray (guint8 *code, guint64 regs, int basereg, int offset)
 {
        int i;
@@ -4541,7 +4541,7 @@ emit_load_regarray (guint8 *code, guint64 regs, int basereg, int offset)
  *   Emit code to store the registers in REGS into consecutive memory locations starting
  * at BASEREG+OFFSET.
  */
-static __attribute__((warn_unused_result)) guint8*
+static __attribute__ ((__warn_unused_result__)) guint8*
 emit_store_regset (guint8 *code, guint64 regs, int basereg, int offset)
 {
        int i, pos;
@@ -4571,7 +4571,7 @@ emit_store_regset (guint8 *code, guint64 regs, int basereg, int offset)
  *   Emit code to load the registers in REGS from consecutive memory locations starting
  * at BASEREG+OFFSET.
  */
-static __attribute__((warn_unused_result)) guint8*
+static __attribute__ ((__warn_unused_result__)) guint8*
 emit_load_regset (guint8 *code, guint64 regs, int basereg, int offset)
 {
        int i, pos;
@@ -4594,19 +4594,19 @@ emit_load_regset (guint8 *code, guint64 regs, int basereg, int offset)
        return code;
 }
 
-__attribute__((warn_unused_result)) guint8*
+__attribute__ ((__warn_unused_result__)) guint8*
 mono_arm_emit_load_regarray (guint8 *code, guint64 regs, int basereg, int offset)
 {
        return emit_load_regarray (code, regs, basereg, offset);
 }
 
-__attribute__((warn_unused_result)) guint8*
+__attribute__ ((__warn_unused_result__)) guint8*
 mono_arm_emit_store_regarray (guint8 *code, guint64 regs, int basereg, int offset)
 {
        return emit_store_regarray (code, regs, basereg, offset);
 }
 
-__attribute__((warn_unused_result)) guint8*
+__attribute__ ((__warn_unused_result__)) guint8*
 mono_arm_emit_store_regset (guint8 *code, guint64 regs, int basereg, int offset)
 {
        return emit_store_regset (code, regs, basereg, offset);
@@ -4614,7 +4614,7 @@ mono_arm_emit_store_regset (guint8 *code, guint64 regs, int basereg, int offset)
 
 /* Same as emit_store_regset, but emit unwind info too */
 /* CFA_OFFSET is the offset between the CFA and basereg */
-static __attribute__((warn_unused_result)) guint8*
+static __attribute__ ((__warn_unused_result__)) guint8*
 emit_store_regset_cfa (MonoCompile *cfg, guint8 *code, guint64 regs, int basereg, int offset, int cfa_offset, guint64 no_cfa_regset)
 {
        int i, j, pos, nregs;
index caace88593aa55330b71e82265663f183080668f..d9a9dbb804149b71b60c3dc1882c34e7d08d1965 100644 (file)
@@ -242,7 +242,7 @@ mono_pmip (void *ip)
  */
 #ifdef __GNUC__
 /* Prevent the linker from optimizing this away in embedding setups to help debugging */
- __attribute__((used))
+ __attribute__ ((__used__))
 #endif
 void
 mono_print_method_from_ip (void *ip)
index 8cbcd45acccc51fe35fc339b2353975983fcc3d5..419c4bf51b5919157d3d81dfc0254ba74ba86679 100644 (file)
@@ -352,7 +352,7 @@ typedef struct {
 typedef struct {
        gint64  gr[5];          /* R2-R6                            */
        gdouble fp[3];          /* F0-F2                            */
-} __attribute__ ((packed)) RegParm;
+} __attribute__ ((__packed__)) RegParm;
 
 typedef struct {
        RR_Format  basr;
@@ -360,7 +360,7 @@ typedef struct {
        void       *pTrigger;
        RXY_Format lg;
        RXY_Format trigger;
-} __attribute__ ((packed)) breakpoint_t;
+} __attribute__ ((__packed__)) breakpoint_t;
 
 /*========================= End of Typedefs ========================*/
 
index b0892f4478fd09effd1ee58ce2c7e2db5bbe3e9b..f0da36fd73def734e02e7740f24c1207215781f0 100644 (file)
@@ -83,7 +83,7 @@ enum {
 #define PROTOCOL_PACK_STRUCTS
 
 #if defined(__GNUC__)
-#define PROTOCOL_STRUCT_ATTR __attribute__ ((packed))
+#define PROTOCOL_STRUCT_ATTR __attribute__ ((__packed__))
 #else
 #define PROTOCOL_STRUCT_ATTR
 #endif
index 774a0ce1022bd4ee6e4463e2376c1ae5d384fcea..ad4a8fc9bac3fbf0bbb0ef0cc4f894e35a9b6ecf 100644 (file)
@@ -34,7 +34,7 @@ typedef int (STDCALL *SimpleDelegate) (int a);
 #if defined(WIN32) && defined (_MSC_VER)
 #define LIBTEST_API __declspec(dllexport)
 #elif defined(__GNUC__)
-#define LIBTEST_API  __attribute__ ((visibility ("default")))
+#define LIBTEST_API  __attribute__ ((__visibility__ ("default")))
 #else
 #define LIBTEST_API
 #endif
@@ -3577,7 +3577,7 @@ mono_test_marshal_ccw_itest (MonoComObject *pUnk)
  */
 
 #if defined(__GNUC__) && ((defined(__i386__) && (defined(__linux__) || defined (__APPLE__)) || defined (__FreeBSD__) || defined(__OpenBSD__)) || (defined(__ppc__) && defined(__APPLE__)))
-#define ALIGN(size) __attribute__ ((aligned(size)))
+#define ALIGN(size) __attribute__ ((__aligned__(size)))
 #else
 #define ALIGN(size)
 #endif
index 543e8ce9b0cb2c7171035f965964887b9835bd42..748720ad95e7eb4328e1eb0072c3596a56c3caf6 100644 (file)
@@ -524,7 +524,7 @@ InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp)
  * so we have to roll our own...
  */
 
-gint64 InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp) __attribute__ ((naked));
+gint64 InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp) __attribute__ ((__naked__));
 
 gint64
 InterlockedCompareExchange64(volatile gint64 *dest, gint64 exch, gint64 comp)
index 8d83f5d672e2cae2bc7ed2a9099c42e9c0599016..f3371b4be1fd93265e80cf86e1757877b7889029 100644 (file)
@@ -8,13 +8,13 @@
 #include <config.h>
 
 #ifdef __GNUC__
-#define MONO_ATTR_USED __attribute__ ((used))
+#define MONO_ATTR_USED __attribute__ ((__used__))
 #else
 #define MONO_ATTR_USED
 #endif
 
 #ifdef __GNUC__
-#define MONO_ATTR_FORMAT_PRINTF(fmt_pos,arg_pos) __attribute__((format(printf,fmt_pos,arg_pos)))
+#define MONO_ATTR_FORMAT_PRINTF(fmt_pos,arg_pos) __attribute__ ((__format__(__printf__,fmt_pos,arg_pos)))
 #else
 #define MONO_ATTR_FORMAT_PRINTF(fmt_pos,arg_pos)
 #endif
@@ -84,7 +84,7 @@ typedef SSIZE_T ssize_t;
 #define MONO_PROFILER_API MONO_API
 
 #ifdef __GNUC__
-#define MONO_ALWAYS_INLINE __attribute__((always_inline))
+#define MONO_ALWAYS_INLINE __attribute__ ((__always_inline__))
 #elif defined(_MSC_VER)
 #define MONO_ALWAYS_INLINE __forceinline
 #else
@@ -92,7 +92,7 @@ typedef SSIZE_T ssize_t;
 #endif
 
 #ifdef __GNUC__
-#define MONO_NEVER_INLINE __attribute__((noinline))
+#define MONO_NEVER_INLINE __attribute__ ((__noinline__))
 #elif defined(_MSC_VER)
 #define MONO_NEVER_INLINE __declspec(noinline)
 #else
@@ -100,7 +100,7 @@ typedef SSIZE_T ssize_t;
 #endif
 
 #ifdef __GNUC__
-#define MONO_COLD __attribute__((cold))
+#define MONO_COLD __attribute__ ((__cold__))
 #else
 #define MONO_COLD
 #endif
index c578a620d925d87eca46a3709d5df296c5570654..93bd236ba75fb463a0dd5c3128b1edff59006f09 100644 (file)
@@ -114,7 +114,7 @@ typedef struct {
        uint8_t sccm:1;         // 142 - Store CPU counter multiple
        uint8_t ibm13:1;        // 143 - Assigned to IBM
        uint8_t x015[14];       // 144-256 Undefined
-} __attribute__ ((packed)) __attribute__ ((aligned(8))) facilityList_t;
+} __attribute__ ((__packed__)) __attribute__ ((__aligned__(8))) facilityList_t;
 
 void
 mono_hwcap_arch_init (void)
index e2614388ce96038ff74ab94e56bea381c128ee23..6b1e71a940a6e07fc80b404834f20e061c482d60 100644 (file)
@@ -45,7 +45,7 @@ typedef unsigned __int64      uint64_t;
 #include <stdint.h>
 
 #ifdef __GNUC__
-#define MONO_API_EXPORT __attribute__ ((visibility ("default")))
+#define MONO_API_EXPORT __attribute__ ((__visibility__ ("default")))
 #else
 #define MONO_API_EXPORT
 #endif
@@ -105,9 +105,9 @@ mono_set_allocator_vtable (MonoAllocatorVTable* vtable);
 #if defined (MONO_INSIDE_RUNTIME)
 
 #if defined (__clang__)
-#define MONO_RT_EXTERNAL_ONLY __attribute__ ((unavailable("The mono runtime must not call this function")))
+#define MONO_RT_EXTERNAL_ONLY __attribute__ ((__unavailable__ ("The mono runtime must not call this function")))
 #elif defined (__GNUC__)
-#define MONO_RT_EXTERNAL_ONLY __attribute__ ((error("The mono runtime must not call this function")))
+#define MONO_RT_EXTERNAL_ONLY __attribute__ ((__error__ ("The mono runtime must not call this function")))
 #else
 #define MONO_RT_EXTERNAL_ONLY
 #endif /* __clang__ */
@@ -117,7 +117,7 @@ mono_set_allocator_vtable (MonoAllocatorVTable* vtable);
 #endif /* MONO_INSIDE_RUNTIME */
 
 #ifdef __GNUC__
-#define _MONO_DEPRECATED __attribute__ ((deprecated))
+#define _MONO_DEPRECATED __attribute__ ((__deprecated__))
 #elif defined (_MSC_VER)
 #define _MONO_DEPRECATED __declspec (deprecated)
 #else
index 68fa0ad5f62312b1e11de46d1b92e073f9eeab03..a90affdd91e77599a111d92b393c5d0d530b928c 100644 (file)
@@ -41,7 +41,7 @@
 #ifdef KRAIT_IT_BUG_WORKAROUND
 #define MONO_SIGNAL_HANDLER_FUNC(access, name, arglist)                \
        static void __krait_ ## name arglist;   \
-       __attribute__ ((naked)) access void                             \
+       __attribute__ ((__naked__)) access void                         \
        name arglist                                                    \
        {                                                               \
                asm volatile (                                          \
@@ -52,7 +52,7 @@
                                  "b __krait_" # name                   \
                                  "\n\t");                                              \
        }       \
-       static __attribute__((used)) void __krait_ ## name arglist
+       static __attribute__ ((__used__)) void __krait_ ## name arglist
 #endif
 
 /* Don't use this */
index da4498936a2160792255e7386d1ebc527c47849d..68b4ce363946b3edc2b59169e548822d4368a172 100644 (file)
@@ -58,7 +58,7 @@
 #if defined(PIC)
 
 #ifdef PIC_INITIAL_EXEC
-#define MONO_TLS_FAST __attribute__((tls_model("initial-exec")))
+#define MONO_TLS_FAST __attribute__ ((__tls_model__("initial-exec")))
 #else
 #if defined (__powerpc__)
 /* local dynamic requires a call to __tls_get_addr to look up the
    For now we will disable this. */
 #define MONO_TLS_FAST
 #else
-#define MONO_TLS_FAST __attribute__((tls_model("local-dynamic")))
+#define MONO_TLS_FAST __attribute__ ((__tls_model__("local-dynamic")))
 #endif
 #endif
 
 #else
 
-#define MONO_TLS_FAST __attribute__((tls_model("local-exec")))
+#define MONO_TLS_FAST __attribute__ ((__tls_model__("local-exec")))
 
 #endif
 
index a8b3ce55cce59f500ebfdf52e5bc6da651d8350a..343d301821e6dfde8a5b846d424fba87d45de9fe 100644 (file)
@@ -6214,7 +6214,7 @@ typedef
 /* Modern GCC will optimize the static routine out if unused,
    and unused attribute will shut down warnings about it.  */
 static int VALGRIND_PRINTF(const char *format, ...)
-   __attribute__((format(__printf__, 1, 2), __unused__));
+   __attribute__ ((__format__(__printf__, 1, 2), __unused__));
 #endif
 static int
 #if defined(_MSC_VER)
@@ -6252,7 +6252,7 @@ VALGRIND_PRINTF(const char *format, ...)
 
 #if defined(__GNUC__) || defined(__INTEL_COMPILER) && !defined(_MSC_VER)
 static int VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
-   __attribute__((format(__printf__, 1, 2), __unused__));
+   __attribute__ ((__format__(__printf__, 1, 2), __unused__));
 #endif
 static int
 #if defined(_MSC_VER)