diff options
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/arc/arc.c | 6 | ||||
-rw-r--r-- | gcc/config/arm/arm.c | 10 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 5 | ||||
-rw-r--r-- | gcc/config/bfin/bfin.c | 2 | ||||
-rw-r--r-- | gcc/config/c4x/c4x.c | 2 | ||||
-rw-r--r-- | gcc/config/darwin.c | 7 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.c | 8 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 17 | ||||
-rw-r--r-- | gcc/config/i386/winnt.c | 7 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 5 | ||||
-rw-r--r-- | gcc/config/ip2k/ip2k.c | 5 | ||||
-rw-r--r-- | gcc/config/m32r/m32r.c | 2 | ||||
-rw-r--r-- | gcc/config/m68hc11/m68hc11.c | 10 | ||||
-rw-r--r-- | gcc/config/m68k/m68k.c | 2 | ||||
-rw-r--r-- | gcc/config/mcore/mcore.c | 2 | ||||
-rw-r--r-- | gcc/config/ns32k/ns32k.c | 2 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 2 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 20 | ||||
-rw-r--r-- | gcc/config/sh/symbian.c | 10 | ||||
-rw-r--r-- | gcc/config/stormy16/stormy16.c | 8 | ||||
-rw-r--r-- | gcc/config/v850/v850.c | 2 |
21 files changed, 77 insertions, 57 deletions
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c index 52eca9f0f0e..2161817ca95 100644 --- a/gcc/config/arc/arc.c +++ b/gcc/config/arc/arc.c @@ -410,14 +410,16 @@ arc_handle_interrupt_attribute (tree *node ATTRIBUTE_UNUSED, if (TREE_CODE (value) != STRING_CST) { - warning (0, "argument of %qs attribute is not a string constant", + warning (OPT_Wattributes, + "argument of %qs attribute is not a string constant", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } else if (strcmp (TREE_STRING_POINTER (value), "ilink1") && strcmp (TREE_STRING_POINTER (value), "ilink2")) { - warning (0, "argument of %qs attribute is not \"ilink1\" or \"ilink2\"", + warning (OPT_Wattributes, + "argument of %qs attribute is not \"ilink1\" or \"ilink2\"", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 26fb38cb779..f2266c7c991 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -2812,7 +2812,7 @@ arm_handle_fndecl_attribute (tree *node, tree name, tree args ATTRIBUTE_UNUSED, { if (TREE_CODE (*node) != FUNCTION_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -2830,7 +2830,7 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags, { if (TREE_CODE (*node) != FUNCTION_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -2844,7 +2844,8 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags, { if (arm_isr_value (args) == ARM_FT_UNKNOWN) { - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); *no_add_attrs = true; } } @@ -2871,7 +2872,8 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags, } else { - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); } } } diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 0be2f1c32f5..45b51f24fb5 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -4676,7 +4676,8 @@ avr_handle_progmem_attribute (tree *node, tree name, } else { - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); *no_add_attrs = true; } } @@ -4695,7 +4696,7 @@ avr_handle_fndecl_attribute (tree *node, tree name, { if (TREE_CODE (*node) != FUNCTION_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c index 653c2003104..8f3e0547457 100644 --- a/gcc/config/bfin/bfin.c +++ b/gcc/config/bfin/bfin.c @@ -2558,7 +2558,7 @@ handle_int_attribute (tree *node, tree name, if (TREE_CODE (x) != FUNCTION_TYPE) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/c4x/c4x.c b/gcc/config/c4x/c4x.c index 09985446191..119c7be80d8 100644 --- a/gcc/config/c4x/c4x.c +++ b/gcc/config/c4x/c4x.c @@ -4486,7 +4486,7 @@ c4x_handle_fntype_attribute (tree *node, tree name, { if (TREE_CODE (*node) != FUNCTION_TYPE) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c index 602df2f7f70..7b3289ffe49 100644 --- a/gcc/config/darwin.c +++ b/gcc/config/darwin.c @@ -1222,7 +1222,8 @@ darwin_handle_weak_import_attribute (tree *node, tree name, { if (TREE_CODE (*node) != FUNCTION_DECL && TREE_CODE (*node) != VAR_DECL) { - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); *no_add_attrs = true; } else @@ -1335,8 +1336,8 @@ darwin_assemble_visibility (tree decl, int vis) fputs ("\n", asm_out_file); } else - warning (0, "internal and protected visibility attributes not supported " - "in this configuration; ignored"); + warning (OPT_Wattributes, "internal and protected visibility attributes " + "not supported in this configuration; ignored"); } /* Output a difference of two labels that will be an assembly time diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c index 77a776856ff..45fb514f226 100644 --- a/gcc/config/h8300/h8300.c +++ b/gcc/config/h8300/h8300.c @@ -5255,7 +5255,7 @@ h8300_handle_fndecl_attribute (tree *node, tree name, { if (TREE_CODE (*node) != FUNCTION_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -5279,7 +5279,8 @@ h8300_handle_eightbit_data_attribute (tree *node, tree name, } else { - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -5302,7 +5303,8 @@ h8300_handle_tiny_data_attribute (tree *node, tree name, } else { - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 2ed8edf7753..43fcd2ef4e4 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1815,7 +1815,7 @@ ix86_handle_cdecl_attribute (tree *node, tree name, && TREE_CODE (*node) != FIELD_DECL && TREE_CODE (*node) != TYPE_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -1843,7 +1843,8 @@ ix86_handle_cdecl_attribute (tree *node, tree name, if (TARGET_64BIT) { - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -1861,7 +1862,7 @@ ix86_handle_regparm_attribute (tree *node, tree name, tree args, && TREE_CODE (*node) != FIELD_DECL && TREE_CODE (*node) != TYPE_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -1872,13 +1873,14 @@ ix86_handle_regparm_attribute (tree *node, tree name, tree args, cst = TREE_VALUE (args); if (TREE_CODE (cst) != INTEGER_CST) { - warning (0, "%qs attribute requires an integer constant argument", + warning (OPT_Wattributes, + "%qs attribute requires an integer constant argument", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } else if (compare_tree_int (cst, REGPARM_MAX) > 0) { - warning (0, "argument to %qs attribute larger than %d", + warning (OPT_Wattributes, "argument to %qs attribute larger than %d", IDENTIFIER_POINTER (name), REGPARM_MAX); *no_add_attrs = true; } @@ -16054,7 +16056,8 @@ ix86_handle_struct_attribute (tree *node, tree name, if (!(type && (TREE_CODE (*type) == RECORD_TYPE || TREE_CODE (*type) == UNION_TYPE))) { - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -16063,7 +16066,7 @@ ix86_handle_struct_attribute (tree *node, tree name, || ((is_attribute_p ("gcc_struct", name) && lookup_attribute ("ms_struct", TYPE_ATTRIBUTES (*type))))) { - warning (0, "%qs incompatible attribute ignored", + warning (OPT_Wattributes, "%qs incompatible attribute ignored", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index 74375aa840e..6eae2e74efa 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -71,7 +71,7 @@ ix86_handle_shared_attribute (tree *node, tree name, { if (TREE_CODE (*node) != VAR_DECL) { - warning (0, "%qs attribute only applies to variables", + warning (OPT_Wattributes, "%qs attribute only applies to variables", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -466,8 +466,9 @@ i386_pe_encode_section_info (tree decl, rtx rtl, int first) warning (0, "%J'%D' defined locally after being " "referenced with dllimport linkage", decl, decl); else - warning (0, "%J'%D' redeclared without dllimport attribute " - "after being referenced with dllimport linkage", decl, decl); + warning (OPT_Wattributes, "%J'%D' redeclared without dllimport " + "attribute after being referenced with dllimport linkage", + decl, decl); } } diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c index c8e0ea398b1..a52b7d850d4 100644 --- a/gcc/config/ia64/ia64.c +++ b/gcc/config/ia64/ia64.c @@ -484,7 +484,7 @@ ia64_handle_model_attribute (tree *node, tree name, tree args, } else { - warning (0, "invalid argument of %qs attribute", + warning (OPT_Wattributes, "invalid argument of %qs attribute", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -516,7 +516,8 @@ ia64_handle_model_attribute (tree *node, tree name, tree args, break; default: - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); *no_add_attrs = true; break; } diff --git a/gcc/config/ip2k/ip2k.c b/gcc/config/ip2k/ip2k.c index 314a2c760f8..7542b46b6fe 100644 --- a/gcc/config/ip2k/ip2k.c +++ b/gcc/config/ip2k/ip2k.c @@ -3161,7 +3161,8 @@ ip2k_handle_progmem_attribute (tree *node, tree name, } else { - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); *no_add_attrs = true; } } @@ -3179,7 +3180,7 @@ ip2k_handle_fndecl_attribute (tree *node, tree name, { if (TREE_CODE (*node) != FUNCTION_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/m32r/m32r.c b/gcc/config/m32r/m32r.c index 6e082032176..c27b2441127 100644 --- a/gcc/config/m32r/m32r.c +++ b/gcc/config/m32r/m32r.c @@ -387,7 +387,7 @@ m32r_handle_model_attribute (tree *node ATTRIBUTE_UNUSED, tree name, && arg != large_ident1 && arg != large_ident2) { - warning (0, "invalid argument of %qs attribute", + warning (OPT_Wattributes, "invalid argument of %qs attribute", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c index 6b68d25fdf7..fca34d27e2f 100644 --- a/gcc/config/m68hc11/m68hc11.c +++ b/gcc/config/m68hc11/m68hc11.c @@ -1115,7 +1115,8 @@ m68hc11_handle_page0_attribute (tree *node, tree name, } else { - warning (0, "%qs attribute ignored", IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute ignored", + IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -1151,7 +1152,7 @@ m68hc11_handle_fntype_attribute (tree *node, tree name, && TREE_CODE (*node) != FIELD_DECL && TREE_CODE (*node) != TYPE_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -1236,13 +1237,14 @@ m68hc11_encode_section_info (tree decl, rtx rtl, int first ATTRIBUTE_UNUSED) trap_handler = lookup_attribute ("trap", func_attr) != NULL_TREE; if (trap_handler && is_far) { - warning (0, "%<trap%> and %<far%> attributes are not compatible, ignoring %<far%>"); + warning (OPT_Wattributes, "%<trap%> and %<far%> attributes are " + "not compatible, ignoring %<far%>"); trap_handler = 0; } if (trap_handler) { if (trap_handler_symbol != 0) - warning (0, "%<trap%> attribute is already used"); + warning (OPT_Wattributes, "%<trap%> attribute is already used"); else trap_handler_symbol = XEXP (rtl, 0); } diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c index e456317fb1d..9db2ddd7fdd 100644 --- a/gcc/config/m68k/m68k.c +++ b/gcc/config/m68k/m68k.c @@ -373,7 +373,7 @@ m68k_handle_fndecl_attribute (tree *node, tree name, { if (TREE_CODE (*node) != FUNCTION_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c index fff8a3e2896..e07f2470b1a 100644 --- a/gcc/config/mcore/mcore.c +++ b/gcc/config/mcore/mcore.c @@ -3029,7 +3029,7 @@ mcore_handle_naked_attribute (tree * node, tree name, tree args ATTRIBUTE_UNUSED } else { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/ns32k/ns32k.c b/gcc/config/ns32k/ns32k.c index f15e5dcc418..e4448efac65 100644 --- a/gcc/config/ns32k/ns32k.c +++ b/gcc/config/ns32k/ns32k.c @@ -1106,7 +1106,7 @@ ns32k_handle_fntype_attribute (tree *node, tree name, && TREE_CODE (*node) != FIELD_DECL && TREE_CODE (*node) != TYPE_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index bcf38e1aa3a..228af5d3aa1 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -16527,7 +16527,7 @@ rs6000_handle_longcall_attribute (tree *node, tree name, && TREE_CODE (*node) != FIELD_DECL && TREE_CODE (*node) != TYPE_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index a0b7862299f..9da837e4aa1 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -7393,7 +7393,7 @@ sh_handle_interrupt_handler_attribute (tree *node, tree name, { if (TREE_CODE (*node) != FUNCTION_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -7414,21 +7414,21 @@ sh_handle_sp_switch_attribute (tree *node, tree name, tree args, { if (TREE_CODE (*node) != FUNCTION_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } else if (!pragma_interrupt) { /* The sp_switch attribute only has meaning for interrupt functions. */ - warning (0, "%qs attribute only applies to interrupt functions", - IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute only applies to " + "interrupt functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } else if (TREE_CODE (TREE_VALUE (args)) != STRING_CST) { /* The argument must be a constant string. */ - warning (0, "%qs attribute argument not a string constant", + warning (OPT_Wattributes, "%qs attribute argument not a string constant", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -7449,22 +7449,22 @@ sh_handle_trap_exit_attribute (tree *node, tree name, tree args, { if (TREE_CODE (*node) != FUNCTION_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } else if (!pragma_interrupt) { /* The trap_exit attribute only has meaning for interrupt functions. */ - warning (0, "%qs attribute only applies to interrupt functions", - IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute only applies to " + "interrupt functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } else if (TREE_CODE (TREE_VALUE (args)) != INTEGER_CST) { /* The argument must be a constant integer. */ - warning (0, "%qs attribute argument not an integer constant", - IDENTIFIER_POINTER (name)); + warning (OPT_Wattributes, "%qs attribute argument not an " + "integer constant", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } else diff --git a/gcc/config/sh/symbian.c b/gcc/config/sh/symbian.c index b3e8287a66b..cc518419792 100644 --- a/gcc/config/sh/symbian.c +++ b/gcc/config/sh/symbian.c @@ -144,7 +144,8 @@ sh_symbian_dllimport_p (tree decl) { /* Don't warn about artificial methods. */ if (!DECL_ARTIFICIAL (decl)) - warning (0, "%H function '%D' is defined after prior declaration as dllimport: attribute ignored", + warning (OPT_Wattributes, "%H function '%D' is defined after prior " + "declaration as dllimport: attribute ignored", & DECL_SOURCE_LOCATION (decl), decl); return false; } @@ -155,7 +156,8 @@ sh_symbian_dllimport_p (tree decl) else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INLINE (decl)) { if (extra_warnings) - warning (0, "%Hinline function '%D' is declared as dllimport: attribute ignored.", + warning (OPT_Wattributes, "%Hinline function '%D' is declared as " + "dllimport: attribute ignored.", & DECL_SOURCE_LOCATION (decl), decl); return false; } @@ -403,14 +405,14 @@ sh_symbian_handle_dll_attribute (tree *pnode, tree name, tree args, | (int) ATTR_FLAG_FUNCTION_NEXT | (int) ATTR_FLAG_ARRAY_NEXT)) { - warning (0, "%qs attribute ignored", attr); + warning (OPT_Wattributes, "%qs attribute ignored", attr); *no_add_attrs = true; return tree_cons (name, args, NULL_TREE); } if (TREE_CODE (node) != RECORD_TYPE && TREE_CODE (node) != UNION_TYPE) { - warning (0, "%qs attribute ignored", attr); + warning (OPT_Wattributes, "%qs attribute ignored", attr); *no_add_attrs = true; } diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c index 79d35def779..469ecf58966 100644 --- a/gcc/config/stormy16/stormy16.c +++ b/gcc/config/stormy16/stormy16.c @@ -2276,7 +2276,7 @@ xstormy16_handle_interrupt_attribute (tree *node, tree name, { if (TREE_CODE (*node) != FUNCTION_TYPE) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } @@ -2297,14 +2297,16 @@ xstormy16_handle_below100_attribute (tree *node, && TREE_CODE (*node) != POINTER_TYPE && TREE_CODE (*node) != TYPE_DECL) { - warning (0, "%<__BELOW100__%> attribute only applies to variables"); + warning (OPT_Wattributes, + "%<__BELOW100__%> attribute only applies to variables"); *no_add_attrs = true; } else if (args == NULL_TREE && TREE_CODE (*node) == VAR_DECL) { if (! (TREE_PUBLIC (*node) || TREE_STATIC (*node))) { - warning (0, "__BELOW100__ attribute not allowed with auto storage class."); + warning (OPT_Wattributes, "__BELOW100__ attribute not allowed " + "with auto storage class."); *no_add_attrs = true; } } diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 06e26db0e1e..f67c4e734cd 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -2101,7 +2101,7 @@ v850_handle_interrupt_attribute (tree * node, { if (TREE_CODE (*node) != FUNCTION_DECL) { - warning (0, "%qs attribute only applies to functions", + warning (OPT_Wattributes, "%qs attribute only applies to functions", IDENTIFIER_POINTER (name)); *no_add_attrs = true; } |