aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2009-05-04 21:24:22 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2009-05-04 21:24:22 +0100
commit88388a52299144bba77776ebc27e343995aa4f3c (patch)
tree68743d2b81c50cab3b9196589c419307e1b8b58f /gcc/c-common.c
parent960c5c791a8cf2314f09eb925cf8b48af2c9d662 (diff)
downloadgcc-88388a52299144bba77776ebc27e343995aa4f3c.zip
gcc-88388a52299144bba77776ebc27e343995aa4f3c.tar.gz
gcc-88388a52299144bba77776ebc27e343995aa4f3c.tar.bz2
c-common.c (handle_mode_attribute): Use %qE for identifiers in diagnostics.
* c-common.c (handle_mode_attribute): Use %qE for identifiers in diagnostics. * c-decl.c (check_bitfield_type_and_width): Make orig_name a tree and pass value to identifier_to_locale. (warn_variable_length_array): Make name a tree. (grokdeclarator): Separate diagnostic texts for named and unnamed declarators. Use %qE for named declarators. * c-parser.c (c_lex_one_token): Use %qE for identifiers in diagnostics. * c-pragma.c (pop_alignment, handle_pragma_pack): Use %qE for identifiers in diagnostics. * c-typeck.c (push_member_name, start_init): Pass identifiers to identifier_to_locale. Mark "anonymous" strings for translation. testsuite: * gcc.dg/ucnid-8.c, gcc.dg/ucnid-9.c, gcc.dg/ucnid-10.c: New tests. * gcc.dg/declspec-9.c, gcc.dg/declspec-10.c, gcc.dg/declspec-11.c: Update expected errors. From-SVN: r147108
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index ff8e83a..9fa3b96 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -6379,15 +6379,16 @@ handle_mode_attribute (tree *node, tree name, tree args,
int ARG_UNUSED (flags), bool *no_add_attrs)
{
tree type = *node;
+ tree ident = TREE_VALUE (args);
*no_add_attrs = true;
- if (TREE_CODE (TREE_VALUE (args)) != IDENTIFIER_NODE)
+ if (TREE_CODE (ident) != IDENTIFIER_NODE)
warning (OPT_Wattributes, "%qE attribute ignored", name);
else
{
int j;
- const char *p = IDENTIFIER_POINTER (TREE_VALUE (args));
+ const char *p = IDENTIFIER_POINTER (ident);
int len = strlen (p);
enum machine_mode mode = VOIDmode;
tree typefm;
@@ -6427,7 +6428,7 @@ handle_mode_attribute (tree *node, tree name, tree args,
if (mode == VOIDmode)
{
- error ("unknown machine mode %qs", p);
+ error ("unknown machine mode %qE", ident);
return NULL_TREE;
}