summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog48
-rw-r--r--gcc/config/arc/arc.c10
-rw-r--r--gcc/config/arm/arm.c16
-rw-r--r--gcc/config/avr/avr.c12
-rw-r--r--gcc/config/bfin/bfin.c20
-rw-r--r--gcc/config/darwin.c14
-rw-r--r--gcc/config/h8300/h8300.c14
-rw-r--r--gcc/config/i386/i386.c32
-rw-r--r--gcc/config/i386/winnt.c10
-rw-r--r--gcc/config/ia64/ia64.c8
-rw-r--r--gcc/config/m32c/m32c.c18
-rw-r--r--gcc/config/m68hc11/m68hc11.c12
-rw-r--r--gcc/config/m68k/m68k.c4
-rw-r--r--gcc/config/mcore/mcore.c8
-rw-r--r--gcc/config/mips/mips.c16
-rw-r--r--gcc/config/rs6000/rs6000.c10
-rw-r--r--gcc/config/sh/sh.c48
-rw-r--r--gcc/config/sh/symbian.c8
-rw-r--r--gcc/config/spu/spu.c6
-rw-r--r--gcc/config/stormy16/stormy16.c6
-rw-r--r--gcc/config/v850/v850-c.c10
-rw-r--r--gcc/config/v850/v850.c6
22 files changed, 194 insertions, 142 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c2e3f12bd65..687757cbb84 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,53 @@
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
translate_identifiers.
(pp_translate_identifiers): New.
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 73682146740..3f81f611f80 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -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;
}
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index e6d2c5c67dc..92647609081 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -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);
}
}
}
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 449c0ee4f89..6bcc8e80372 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -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;
}
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 17201c652e1..077d5c544a7 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -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
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 88d032f2ef6..c8bb508e8aa 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -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
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index f75a4961d73..34d1f82687c 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -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;
}
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index f3d35cea9c5..aefb891ff5b 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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;
}
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c
index 62ac279ccd4..3d88517c234 100644
--- a/gcc/config/i386/winnt.c
+++ b/gcc/config/i386/winnt.c
@@ -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;
}
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 9acb5702112..acf73c52969 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -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;
}
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index 6d386e3d8fd..d0980dd63a6 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -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;
diff --git a/gcc/config/m68hc11/m68hc11.c b/gcc/config/m68hc11/m68hc11.c
index 5050fa46415..10bc7a0e66e 100644
--- a/gcc/config/m68hc11/m68hc11.c
+++ b/gcc/config/m68hc11/m68hc11.c
@@ -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;
}
diff --git a/gcc/config/m68k/m68k.c b/gcc/config/m68k/m68k.c
index e4bb1e2b4a2..d3734efd9cf 100644
--- a/gcc/config/m68k/m68k.c
+++ b/gcc/config/m68k/m68k.c
@@ -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;
}
diff --git a/gcc/config/mcore/mcore.c b/gcc/config/mcore/mcore.c
index 92300532e99..24cc9406ed7 100644
--- a/gcc/config/mcore/mcore.c
+++ b/gcc/config/mcore/mcore.c
@@ -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;
}
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index b40ba3ba5fe..32c898bcf83 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -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)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 4e230439098..8e24769816d 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -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;
}
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 1c915a5bf8e..d23a45a2289 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -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;
}
diff --git a/gcc/config/sh/symbian.c b/gcc/config/sh/symbian.c
index 15932dc7a41..f32adf9717f 100644
--- a/gcc/config/sh/symbian.c
+++ b/gcc/config/sh/symbian.c
@@ -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;
}
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index eb7ded6ec60..bb73622f9d5 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -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);
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 343153d4a14..eefc58f0847 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -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;
}
diff --git a/gcc/config/v850/v850-c.c b/gcc/config/v850/v850-c.c
index dc0082cf6ef..718eb82441e 100644
--- a/gcc/config/v850/v850-c.c
+++ b/gcc/config/v850/v850-c.c
@@ -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;
}
diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c
index b556cbdf8cc..a562202538b 100644
--- a/gcc/config/v850/v850.c
+++ b/gcc/config/v850/v850.c
@@ -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;
}