arc.c (arc_handle_interrupt_attribute): Use %qE for identifiers in diagnostics.

* config/arc/arc.c (arc_handle_interrupt_attribute): Use %qE for
	identifiers in diagnostics.
	* config/arm/arm.c (arm_handle_fndecl_attribute,
	arm_handle_isr_attribute): Likewise.
	* config/avr/avr.c (avr_handle_progmem_attribute,
	avr_handle_fndecl_attribute, avr_handle_fntype_attribute):
	Likewise.
	* config/bfin/bfin.c (handle_int_attribute,
	bfin_handle_longcall_attribute, bfin_handle_l1_text_attribute,
	bfin_handle_l1_data_attribute, bfin_handle_longcall_attribute,
	bfin_handle_l1_text_attribute, bfin_handle_l1_data_attribute):
	Likewise.
	* config/darwin.c (darwin_handle_kext_attribute,
	darwin_handle_weak_import_attribute): Likewise.
	* config/h8300/h8300.c (h8300_handle_fndecl_attribute,
	h8300_handle_eightbit_data_attribute,
	h8300_handle_tiny_data_attribute): Likewise.
	* config/i386/i386.c (ix86_handle_cconv_attribute,
	ix86_handle_abi_attribute, ix86_handle_struct_attribute):
	Likewise.
	* config/i386/winnt.c (ix86_handle_shared_attribute,
	ix86_handle_selectany_attribute): Likewise.
	* config/ia64/ia64.c (ia64_handle_model_attribute): Likewise.
	* config/m32c/m32c.c (function_vector_handler): Likewise.
	* config/m68hc11/m68hc11.c (m68hc11_handle_page0_attribute,
	m68hc11_handle_fntype_attribute): Likewise.
	* config/m68k/m68k.c (m68k_handle_fndecl_attribute): Likewise.
	* config/mcore/mcore.c (mcore_handle_naked_attribute): Likewise.
	* config/mips/mips.c (mips_insert_attributes,
	mips_merge_decl_attributes, mips_expand_builtin): Likewise.
	* config/rs6000/rs6000.c (rs6000_handle_longcall_attribute,
	rs6000_handle_struct_attribute): Likewise.
	* config/sh/sh.c (sh_insert_attributes,
	sh_handle_resbank_handler_attribute,
	sh_handle_interrupt_handler_attribute,
	sh2a_handle_function_vector_handler_attribute,
	sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
	Likewise.
	* config/sh/symbian.c (sh_symbian_mark_dllimport): Likewise.
	* config/spu/spu.c (spu_handle_fndecl_attribute,
	spu_handle_vector_attribute): Likewise.
	* config/stormy16/stormy16.c
	(xstormy16_handle_interrupt_attribute): Likewise.
	* config/v850/v850-c.c (ghs_pragma_section): Likewise.
	* config/v850/v850.c (v850_handle_interrupt_attribute): Likewise.

From-SVN: r147334
This commit is contained in:
Joseph Myers 2009-05-10 11:29:35 +01:00 committed by Joseph Myers
parent f41c4af3d6
commit 29d08eba74
22 changed files with 194 additions and 142 deletions

View file

@ -1,3 +1,51 @@
2009-05-10 Joseph Myers <joseph@codesourcery.com>
* config/arc/arc.c (arc_handle_interrupt_attribute): Use %qE for
identifiers in diagnostics.
* config/arm/arm.c (arm_handle_fndecl_attribute,
arm_handle_isr_attribute): Likewise.
* config/avr/avr.c (avr_handle_progmem_attribute,
avr_handle_fndecl_attribute, avr_handle_fntype_attribute):
Likewise.
* config/bfin/bfin.c (handle_int_attribute,
bfin_handle_longcall_attribute, bfin_handle_l1_text_attribute,
bfin_handle_l1_data_attribute, bfin_handle_longcall_attribute,
bfin_handle_l1_text_attribute, bfin_handle_l1_data_attribute):
Likewise.
* config/darwin.c (darwin_handle_kext_attribute,
darwin_handle_weak_import_attribute): Likewise.
* config/h8300/h8300.c (h8300_handle_fndecl_attribute,
h8300_handle_eightbit_data_attribute,
h8300_handle_tiny_data_attribute): Likewise.
* config/i386/i386.c (ix86_handle_cconv_attribute,
ix86_handle_abi_attribute, ix86_handle_struct_attribute):
Likewise.
* config/i386/winnt.c (ix86_handle_shared_attribute,
ix86_handle_selectany_attribute): Likewise.
* config/ia64/ia64.c (ia64_handle_model_attribute): Likewise.
* config/m32c/m32c.c (function_vector_handler): Likewise.
* config/m68hc11/m68hc11.c (m68hc11_handle_page0_attribute,
m68hc11_handle_fntype_attribute): Likewise.
* config/m68k/m68k.c (m68k_handle_fndecl_attribute): Likewise.
* config/mcore/mcore.c (mcore_handle_naked_attribute): Likewise.
* config/mips/mips.c (mips_insert_attributes,
mips_merge_decl_attributes, mips_expand_builtin): Likewise.
* config/rs6000/rs6000.c (rs6000_handle_longcall_attribute,
rs6000_handle_struct_attribute): Likewise.
* config/sh/sh.c (sh_insert_attributes,
sh_handle_resbank_handler_attribute,
sh_handle_interrupt_handler_attribute,
sh2a_handle_function_vector_handler_attribute,
sh_handle_sp_switch_attribute, sh_handle_trap_exit_attribute):
Likewise.
* config/sh/symbian.c (sh_symbian_mark_dllimport): Likewise.
* config/spu/spu.c (spu_handle_fndecl_attribute,
spu_handle_vector_attribute): Likewise.
* config/stormy16/stormy16.c
(xstormy16_handle_interrupt_attribute): Likewise.
* config/v850/v850-c.c (ghs_pragma_section): Likewise.
* config/v850/v850.c (v850_handle_interrupt_attribute): Likewise.
2009-05-10 Joseph Myers <joseph@codesourcery.com>
* pretty-print.h (struct pretty_print_info): Add

View file

@ -1,6 +1,6 @@
/* Subroutines used for code generation on the Argonaut ARC cpu.
Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@ -389,16 +389,16 @@ arc_handle_interrupt_attribute (tree *node ATTRIBUTE_UNUSED,
if (TREE_CODE (value) != STRING_CST)
{
warning (OPT_Wattributes,
"argument of %qs attribute is not a string constant",
IDENTIFIER_POINTER (name));
"argument of %qE attribute is not a string constant",
name);
*no_add_attrs = true;
}
else if (strcmp (TREE_STRING_POINTER (value), "ilink1")
&& strcmp (TREE_STRING_POINTER (value), "ilink2"))
{
warning (OPT_Wattributes,
"argument of %qs attribute is not \"ilink1\" or \"ilink2\"",
IDENTIFIER_POINTER (name));
"argument of %qE attribute is not \"ilink1\" or \"ilink2\"",
name);
*no_add_attrs = true;
}

View file

@ -3264,8 +3264,8 @@ arm_handle_fndecl_attribute (tree *node, tree name, tree args ATTRIBUTE_UNUSED,
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
@ -3282,8 +3282,8 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags,
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
/* FIXME: the argument if any is checked for type attributes;
@ -3296,8 +3296,8 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags,
{
if (arm_isr_value (args) == ARM_FT_UNKNOWN)
{
warning (OPT_Wattributes, "%qs attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored",
name);
*no_add_attrs = true;
}
}
@ -3324,8 +3324,8 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags,
}
else
{
warning (OPT_Wattributes, "%qs attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored",
name);
}
}
}

View file

@ -4804,8 +4804,8 @@ avr_handle_progmem_attribute (tree *node, tree name,
}
else
{
warning (OPT_Wattributes, "%qs attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored",
name);
*no_add_attrs = true;
}
}
@ -4824,8 +4824,8 @@ avr_handle_fndecl_attribute (tree *node, tree name,
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
@ -4840,8 +4840,8 @@ avr_handle_fntype_attribute (tree *node, tree name,
{
if (TREE_CODE (*node) != FUNCTION_TYPE)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}

View file

@ -5267,8 +5267,8 @@ handle_int_attribute (tree *node, tree name,
if (TREE_CODE (x) != FUNCTION_TYPE)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
else if (funkind (x) != SUBROUTINE)
@ -5328,8 +5328,8 @@ bfin_handle_longcall_attribute (tree *node, tree name,
&& TREE_CODE (*node) != FIELD_DECL
&& TREE_CODE (*node) != TYPE_DECL)
{
warning (OPT_Wattributes, "`%s' attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
@ -5357,8 +5357,8 @@ bfin_handle_l1_text_attribute (tree *node, tree name, tree ARG_UNUSED (args),
if (TREE_CODE (decl) != FUNCTION_DECL)
{
error ("`%s' attribute only applies to functions",
IDENTIFIER_POINTER (name));
error ("%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
@ -5389,15 +5389,15 @@ bfin_handle_l1_data_attribute (tree *node, tree name, tree ARG_UNUSED (args),
if (TREE_CODE (decl) != VAR_DECL)
{
error ("`%s' attribute only applies to variables",
IDENTIFIER_POINTER (name));
error ("%qE attribute only applies to variables",
name);
*no_add_attrs = true;
}
else if (current_function_decl != NULL_TREE
&& !TREE_STATIC (decl))
{
error ("`%s' attribute cannot be specified for local variables",
IDENTIFIER_POINTER (name));
error ("%qE attribute cannot be specified for local variables",
name);
*no_add_attrs = true;
}
else

View file

@ -1,6 +1,6 @@
/* Functions for generic Darwin as target machine for GNU C compiler.
Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008
2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Apple Computer Inc.
@ -1407,15 +1407,15 @@ darwin_handle_kext_attribute (tree *node, tree name,
/* APPLE KEXT stuff -- only applies with pure static C++ code. */
if (! TARGET_KEXTABI)
{
warning (0, "%<%s%> 2.95 vtable-compatibility attribute applies "
"only when compiling a kext", IDENTIFIER_POINTER (name));
warning (0, "%qE 2.95 vtable-compatibility attribute applies "
"only when compiling a kext", name);
*no_add_attrs = true;
}
else if (TREE_CODE (*node) != RECORD_TYPE)
{
warning (0, "%<%s%> 2.95 vtable-compatibility attribute applies "
"only to C++ classes", IDENTIFIER_POINTER (name));
warning (0, "%qE 2.95 vtable-compatibility attribute applies "
"only to C++ classes", name);
*no_add_attrs = true;
}
@ -1434,8 +1434,8 @@ darwin_handle_weak_import_attribute (tree *node, tree name,
{
if (TREE_CODE (*node) != FUNCTION_DECL && TREE_CODE (*node) != VAR_DECL)
{
warning (OPT_Wattributes, "%qs attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored",
name);
*no_add_attrs = true;
}
else

View file

@ -1,6 +1,6 @@
/* Subroutines for insn-output.c for Renesas H8/300.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Steve Chamberlain (sac@cygnus.com),
Jim Wilson (wilson@cygnus.com), and Doug Evans (dje@cygnus.com).
@ -5256,8 +5256,8 @@ h8300_handle_fndecl_attribute (tree *node, tree name,
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
@ -5280,8 +5280,8 @@ h8300_handle_eightbit_data_attribute (tree *node, tree name,
}
else
{
warning (OPT_Wattributes, "%qs attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored",
name);
*no_add_attrs = true;
}
@ -5304,8 +5304,8 @@ h8300_handle_tiny_data_attribute (tree *node, tree name,
}
else
{
warning (OPT_Wattributes, "%qs attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored",
name);
*no_add_attrs = true;
}

View file

@ -4245,8 +4245,8 @@ ix86_handle_cconv_attribute (tree *node, tree name,
&& TREE_CODE (*node) != FIELD_DECL
&& TREE_CODE (*node) != TYPE_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
return NULL_TREE;
}
@ -4265,14 +4265,14 @@ ix86_handle_cconv_attribute (tree *node, tree name,
if (TREE_CODE (cst) != INTEGER_CST)
{
warning (OPT_Wattributes,
"%qs attribute requires an integer constant argument",
IDENTIFIER_POINTER (name));
"%qE attribute requires an integer constant argument",
name);
*no_add_attrs = true;
}
else if (compare_tree_int (cst, REGPARM_MAX) > 0)
{
warning (OPT_Wattributes, "argument to %qs attribute larger than %d",
IDENTIFIER_POINTER (name), REGPARM_MAX);
warning (OPT_Wattributes, "argument to %qE attribute larger than %d",
name, REGPARM_MAX);
*no_add_attrs = true;
}
@ -4283,8 +4283,8 @@ ix86_handle_cconv_attribute (tree *node, tree name,
{
/* Do not warn when emulating the MS ABI. */
if (TREE_CODE (*node) != FUNCTION_TYPE || ix86_function_type_abi (*node)!=MS_ABI)
warning (OPT_Wattributes, "%qs attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored",
name);
*no_add_attrs = true;
return NULL_TREE;
}
@ -26836,15 +26836,15 @@ ix86_handle_abi_attribute (tree *node, tree name,
&& TREE_CODE (*node) != FIELD_DECL
&& TREE_CODE (*node) != TYPE_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
return NULL_TREE;
}
if (!TARGET_64BIT)
{
warning (OPT_Wattributes, "%qs attribute only available for 64-bit",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only available for 64-bit",
name);
*no_add_attrs = true;
return NULL_TREE;
}
@ -26891,8 +26891,8 @@ ix86_handle_struct_attribute (tree *node, tree name,
if (!(type && (TREE_CODE (*type) == RECORD_TYPE
|| TREE_CODE (*type) == UNION_TYPE)))
{
warning (OPT_Wattributes, "%qs attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored",
name);
*no_add_attrs = true;
}
@ -26901,8 +26901,8 @@ ix86_handle_struct_attribute (tree *node, tree name,
|| ((is_attribute_p ("gcc_struct", name)
&& lookup_attribute ("ms_struct", TYPE_ATTRIBUTES (*type)))))
{
warning (OPT_Wattributes, "%qs incompatible attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE incompatible attribute ignored",
name);
*no_add_attrs = true;
}

View file

@ -1,7 +1,7 @@
/* Subroutines for insn-output.c for Windows NT.
Contributed by Douglas Rupp (drupp@cs.washington.edu)
Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006, 2007, 2008 Free Software Foundation, Inc.
2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
This file is part of GCC.
@ -56,8 +56,8 @@ ix86_handle_shared_attribute (tree *node, tree name,
{
if (TREE_CODE (*node) != VAR_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to variables",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to variables",
name);
*no_add_attrs = true;
}
@ -78,8 +78,8 @@ ix86_handle_selectany_attribute (tree *node, tree name,
initialization later in encode_section_info. */
if (TREE_CODE (*node) != VAR_DECL || !TREE_PUBLIC (*node))
{
error ("%qs attribute applies only to initialized variables"
" with external linkage", IDENTIFIER_POINTER (name));
error ("%qE attribute applies only to initialized variables"
" with external linkage", name);
*no_add_attrs = true;
}

View file

@ -586,8 +586,8 @@ ia64_handle_model_attribute (tree *node, tree name, tree args,
}
else
{
warning (OPT_Wattributes, "invalid argument of %qs attribute",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "invalid argument of %qE attribute",
name);
*no_add_attrs = true;
}
@ -618,8 +618,8 @@ ia64_handle_model_attribute (tree *node, tree name, tree args,
break;
default:
warning (OPT_Wattributes, "%qs attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored",
name);
*no_add_attrs = true;
break;
}

View file

@ -1,5 +1,5 @@
/* Target Code for R8C/M16C/M32C
Copyright (C) 2005, 2006, 2007, 2008
Copyright (C) 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Contributed by Red Hat.
@ -2781,24 +2781,24 @@ function_vector_handler (tree * node ATTRIBUTE_UNUSED,
{
/* The attribute is not supported for R8C target. */
warning (OPT_Wattributes,
"`%s' attribute is not supported for R8C target",
IDENTIFIER_POINTER (name));
"%qE attribute is not supported for R8C target",
name);
*no_add_attrs = true;
}
else if (TREE_CODE (*node) != FUNCTION_DECL)
{
/* The attribute must be applied to functions only. */
warning (OPT_Wattributes,
"`%s' attribute applies only to functions",
IDENTIFIER_POINTER (name));
"%qE attribute applies only to functions",
name);
*no_add_attrs = true;
}
else if (TREE_CODE (TREE_VALUE (args)) != INTEGER_CST)
{
/* The argument must be a constant integer. */
warning (OPT_Wattributes,
"`%s' attribute argument not an integer constant",
IDENTIFIER_POINTER (name));
"%qE attribute argument not an integer constant",
name);
*no_add_attrs = true;
}
else if (TREE_INT_CST_LOW (TREE_VALUE (args)) < 18
@ -2806,8 +2806,8 @@ function_vector_handler (tree * node ATTRIBUTE_UNUSED,
{
/* The argument value must be between 18 to 255. */
warning (OPT_Wattributes,
"`%s' attribute argument should be between 18 to 255",
IDENTIFIER_POINTER (name));
"%qE attribute argument should be between 18 to 255",
name);
*no_add_attrs = true;
}
return NULL_TREE;

View file

@ -1,6 +1,6 @@
/* Subroutines for code generation on Motorola 68HC11 and 68HC12.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
Free Software Foundation, Inc.
Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
2009 Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr)
This file is part of GCC.
@ -1107,8 +1107,8 @@ m68hc11_handle_page0_attribute (tree *node, tree name,
}
else
{
warning (OPT_Wattributes, "%qs attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored",
name);
*no_add_attrs = true;
}
@ -1144,8 +1144,8 @@ m68hc11_handle_fntype_attribute (tree *node, tree name,
&& TREE_CODE (*node) != FIELD_DECL
&& TREE_CODE (*node) != TYPE_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}

View file

@ -781,8 +781,8 @@ m68k_handle_fndecl_attribute (tree *node, tree name,
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}

View file

@ -1,6 +1,6 @@
/* Output routines for Motorola MCore processor
Copyright (C) 1993, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
Free Software Foundation, Inc.
Copyright (C) 1993, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008,
2009 Free Software Foundation, Inc.
This file is part of GCC.
@ -3031,8 +3031,8 @@ mcore_handle_naked_attribute (tree * node, tree name, tree args ATTRIBUTE_UNUSED
}
else
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}

View file

@ -1292,9 +1292,9 @@ mips_insert_attributes (tree decl, tree *attributes)
{
/* DECL cannot be simultaneously "mips16" and "nomips16". */
if (mips16_p && nomips16_p)
error ("%qs cannot have both %<mips16%> and "
error ("%qE cannot have both %<mips16%> and "
"%<nomips16%> attributes",
IDENTIFIER_POINTER (DECL_NAME (decl)));
DECL_NAME (decl));
}
else if (TARGET_FLIP_MIPS16 && !DECL_ARTIFICIAL (decl))
{
@ -1314,11 +1314,11 @@ mips_merge_decl_attributes (tree olddecl, tree newdecl)
{
/* The decls' "mips16" and "nomips16" attributes must match exactly. */
if (mips_mips16_decl_p (olddecl) != mips_mips16_decl_p (newdecl))
error ("%qs redeclared with conflicting %qs attributes",
IDENTIFIER_POINTER (DECL_NAME (newdecl)), "mips16");
error ("%qE redeclared with conflicting %qs attributes",
DECL_NAME (newdecl), "mips16");
if (mips_nomips16_decl_p (olddecl) != mips_nomips16_decl_p (newdecl))
error ("%qs redeclared with conflicting %qs attributes",
IDENTIFIER_POINTER (DECL_NAME (newdecl)), "nomips16");
error ("%qE redeclared with conflicting %qs attributes",
DECL_NAME (newdecl), "nomips16");
return merge_attributes (DECL_ATTRIBUTES (olddecl),
DECL_ATTRIBUTES (newdecl));
@ -12372,8 +12372,8 @@ mips_expand_builtin (tree exp, rtx target, rtx subtarget ATTRIBUTE_UNUSED,
gcc_assert (avail != 0);
if (TARGET_MIPS16)
{
error ("built-in function %qs not supported for MIPS16",
IDENTIFIER_POINTER (DECL_NAME (fndecl)));
error ("built-in function %qE not supported for MIPS16",
DECL_NAME (fndecl));
return ignore ? const0_rtx : CONST0_RTX (mode);
}
switch (d->builtin_type)

View file

@ -20667,8 +20667,8 @@ rs6000_handle_longcall_attribute (tree *node, tree name,
&& TREE_CODE (*node) != FIELD_DECL
&& TREE_CODE (*node) != TYPE_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
@ -20741,7 +20741,7 @@ rs6000_handle_struct_attribute (tree *node, tree name,
if (!(type && (TREE_CODE (*type) == RECORD_TYPE
|| TREE_CODE (*type) == UNION_TYPE)))
{
warning (OPT_Wattributes, "%qs attribute ignored", IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute ignored", name);
*no_add_attrs = true;
}
@ -20750,8 +20750,8 @@ rs6000_handle_struct_attribute (tree *node, tree name,
|| ((is_attribute_p ("gcc_struct", name)
&& lookup_attribute ("ms_struct", TYPE_ATTRIBUTES (*type)))))
{
warning (OPT_Wattributes, "%qs incompatible attribute ignored",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE incompatible attribute ignored",
name);
*no_add_attrs = true;
}

View file

@ -8040,8 +8040,8 @@ sh_insert_attributes (tree node, tree *attributes)
|| is_attribute_p ("nosave_low_regs", TREE_PURPOSE (attrs))
|| is_attribute_p ("resbank", TREE_PURPOSE (attrs)))
warning (OPT_Wattributes,
"%qs attribute only applies to interrupt functions",
IDENTIFIER_POINTER (TREE_PURPOSE (attrs)));
"%qE attribute only applies to interrupt functions",
TREE_PURPOSE (attrs));
else
{
*tail = tree_cons (TREE_PURPOSE (attrs), NULL_TREE,
@ -8123,14 +8123,14 @@ sh_handle_resbank_handler_attribute (tree * node, tree name,
{
if (!TARGET_SH2A)
{
warning (OPT_Wattributes, "%qs attribute is supported only for SH2A",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute is supported only for SH2A",
name);
*no_add_attrs = true;
}
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
@ -8147,8 +8147,8 @@ sh_handle_interrupt_handler_attribute (tree *node, tree name,
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
else if (TARGET_SHCOMPACT)
@ -8170,30 +8170,30 @@ sh2a_handle_function_vector_handler_attribute (tree * node, tree name,
{
if (!TARGET_SH2A)
{
warning (OPT_Wattributes, "%qs attribute only applies to SH2A",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to SH2A",
name);
*no_add_attrs = true;
}
else if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
else if (TREE_CODE (TREE_VALUE (args)) != INTEGER_CST)
{
/* The argument must be a constant integer. */
warning (OPT_Wattributes,
"`%s' attribute argument not an integer constant",
IDENTIFIER_POINTER (name));
"%qE attribute argument not an integer constant",
name);
*no_add_attrs = true;
}
else if (TREE_INT_CST_LOW (TREE_VALUE (args)) > 255)
{
/* The argument value must be between 0 to 255. */
warning (OPT_Wattributes,
"`%s' attribute argument should be between 0 to 255",
IDENTIFIER_POINTER (name));
"%qE attribute argument should be between 0 to 255",
name);
*no_add_attrs = true;
}
return NULL_TREE;
@ -8258,15 +8258,15 @@ sh_handle_sp_switch_attribute (tree *node, tree name, tree args,
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
else if (TREE_CODE (TREE_VALUE (args)) != STRING_CST)
{
/* The argument must be a constant string. */
warning (OPT_Wattributes, "%qs attribute argument not a string constant",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute argument not a string constant",
name);
*no_add_attrs = true;
}
@ -8281,8 +8281,8 @@ sh_handle_trap_exit_attribute (tree *node, tree name, tree args,
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
/* The argument specifies a trap number to be used in a trapa instruction
@ -8290,8 +8290,8 @@ sh_handle_trap_exit_attribute (tree *node, tree name, tree args,
else if (TREE_CODE (TREE_VALUE (args)) != INTEGER_CST)
{
/* The argument must be a constant integer. */
warning (OPT_Wattributes, "%qs attribute argument not an "
"integer constant", IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute argument not an "
"integer constant", name);
*no_add_attrs = true;
}

View file

@ -269,8 +269,8 @@ sh_symbian_mark_dllimport (tree decl)
if (sh_symbian_dllexport_name_p (oldname))
{
error ("%qs declared as both exported to and imported from a DLL",
IDENTIFIER_POINTER (DECL_NAME (decl)));
error ("%qE declared as both exported to and imported from a DLL",
DECL_NAME (decl));
}
else if (sh_symbian_dllimport_name_p (oldname))
{
@ -502,8 +502,8 @@ sh_symbian_handle_dll_attribute (tree *pnode, tree name, tree args,
&& ( TREE_CODE (node) == VAR_DECL
|| TREE_CODE (node) == FUNCTION_DECL))
{
error ("external linkage required for symbol %q+D because of %qs attribute",
node, IDENTIFIER_POINTER (name));
error ("external linkage required for symbol %q+D because of %qE attribute",
node, name);
*no_add_attrs = true;
}

View file

@ -3723,8 +3723,8 @@ spu_handle_fndecl_attribute (tree * node,
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (0, "`%s' attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (0, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}
@ -3781,7 +3781,7 @@ spu_handle_vector_attribute (tree * node, tree name,
*no_add_attrs = true; /* No need to hang on to the attribute. */
if (!result)
warning (0, "`%s' attribute ignored", IDENTIFIER_POINTER (name));
warning (0, "%qE attribute ignored", name);
else
*node = lang_hooks.types.reconstruct_complex_type (*node, result);

View file

@ -1,6 +1,6 @@
/* Xstormy16 target functions.
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008 Free Software Foundation, Inc.
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Red Hat, Inc.
This file is part of GCC.
@ -2218,8 +2218,8 @@ xstormy16_handle_interrupt_attribute (tree *node, tree name,
{
if (TREE_CODE (*node) != FUNCTION_TYPE)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}

View file

@ -1,5 +1,5 @@
/* v850 specific, C compiler specific functions.
Copyright (C) 2000, 2007 Free Software Foundation, Inc.
Copyright (C) 2000, 2007, 2009 Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
This file is part of GCC.
@ -121,6 +121,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
{
tree x;
enum cpp_ttype type;
tree sect_ident;
const char *sect, *alias;
enum GHS_section_kind kind;
@ -129,7 +130,10 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
if (type == CPP_EOF && !repeat)
goto reset;
else if (type == CPP_NAME)
sect = IDENTIFIER_POINTER (x);
{
sect_ident = x;
sect = IDENTIFIER_POINTER (sect_ident);
}
else
goto bad;
repeat = 0;
@ -162,7 +166,7 @@ ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED)
else if (streq (sect, "zbss")) kind = GHS_SECTION_KIND_ZDATA;
else
{
warning (0, "unrecognized section name \"%s\"", sect);
warning (0, "unrecognized section name %qE", sect_ident);
return;
}

View file

@ -1,6 +1,6 @@
/* Subroutines for insn-output.c for NEC V850 series
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006, 2007, 2008 Free Software Foundation, Inc.
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Jeff Law (law@cygnus.com).
This file is part of GCC.
@ -2045,8 +2045,8 @@ v850_handle_interrupt_attribute (tree * node,
{
if (TREE_CODE (*node) != FUNCTION_DECL)
{
warning (OPT_Wattributes, "%qs attribute only applies to functions",
IDENTIFIER_POINTER (name));
warning (OPT_Wattributes, "%qE attribute only applies to functions",
name);
*no_add_attrs = true;
}