diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2001-10-30 12:14:28 +0000 |
---|---|---|
committer | Joseph Myers <jsm28@gcc.gnu.org> | 2001-10-30 12:14:28 +0000 |
commit | 53fcdc7677776c3ccbe098ee4f8fe082cae5f28e (patch) | |
tree | 2b186d54ffc78842ba447fb2fb99339ac3c52af3 /gcc/c-decl.c | |
parent | 73991d6ae74ffcb1fbd0dc4435c5aa7dc50947d7 (diff) | |
download | gcc-53fcdc7677776c3ccbe098ee4f8fe082cae5f28e.zip gcc-53fcdc7677776c3ccbe098ee4f8fe082cae5f28e.tar.gz gcc-53fcdc7677776c3ccbe098ee4f8fe082cae5f28e.tar.bz2 |
Localization fixes.
2001-10-30 Paolo Bonzini <bonzini@gnu.org>
Localization fixes.
* c-decl.c (parmlist_tags_warning, start_struct,
check_for_loop_decls): Separate messages for struct, union and
enum cases to allow for languages in which they have different
genders.
* c-format.c (scanf_flag_specs): Separate short and long name of
the assignment suppression feature.
(check_format_types): Localize "pointer" and "different types"
strings.
* c-lex.c (lex_number): Localize "an unsigned long int" and
related strings.
(lex_string) [MULTIBYTE_CHARS]: Use initial lowercase letter on
warning message.
* c-typeck.c (build_unary_up): Separate messages for increment and
decrement cases to allow for languages in which they use different
articles. Localize the strings "increment" and "decrement" in one
case.
From-SVN: r46635
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 46 |
1 files changed, 33 insertions, 13 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 58bac42..c840057 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -5317,11 +5317,17 @@ parmlist_tags_warning () if (code == UNION_TYPE && TREE_PURPOSE (elt) == 0 && !pedantic) continue; if (TREE_PURPOSE (elt) != 0) - warning ("`%s %s' declared inside parameter list", - (code == RECORD_TYPE ? "struct" - : code == UNION_TYPE ? "union" - : "enum"), - IDENTIFIER_POINTER (TREE_PURPOSE (elt))); + { + if (code == RECORD_TYPE) + warning ("`struct %s' declared inside parameter list", + IDENTIFIER_POINTER (TREE_PURPOSE (elt))); + else if (code == UNION_TYPE) + warning ("`union %s' declared inside parameter list", + IDENTIFIER_POINTER (TREE_PURPOSE (elt))); + else + warning ("`enum %s' declared inside parameter list", + IDENTIFIER_POINTER (TREE_PURPOSE (elt))); + } else { /* For translation these need to be separate warnings */ @@ -5411,9 +5417,14 @@ start_struct (code, name) C_TYPE_BEING_DEFINED (ref) = 1; TYPE_PACKED (ref) = flag_pack_struct; if (TYPE_FIELDS (ref)) - error ("redefinition of `%s %s'", - code == UNION_TYPE ? "union" : "struct", - IDENTIFIER_POINTER (name)); + { + if (code == UNION_TYPE) + error ("redefinition of `union %s'", + IDENTIFIER_POINTER (name)); + else + error ("redefinition of `struct %s'", + IDENTIFIER_POINTER (name)); + } return ref; } @@ -6995,12 +7006,21 @@ check_for_loop_decls () for (t = gettags (); t; t = TREE_CHAIN (t)) { if (TREE_PURPOSE (t) != 0) - error ("`%s %s' declared in `for' loop initial declaration", - (TREE_CODE (TREE_VALUE (t)) == RECORD_TYPE ? "struct" - : TREE_CODE (TREE_VALUE (t)) == UNION_TYPE ? "union" - : "enum"), - IDENTIFIER_POINTER (TREE_PURPOSE (t))); + { + enum tree_code code = TREE_CODE (TREE_VALUE (t)); + + if (code == RECORD_TYPE) + error ("`struct %s' declared in `for' loop initial declaration", + IDENTIFIER_POINTER (TREE_PURPOSE (t))); + else if (code == UNION_TYPE) + error ("`union %s' declared in `for' loop initial declaration", + IDENTIFIER_POINTER (TREE_PURPOSE (t))); + else + error ("`enum %s' declared in `for' loop initial declaration", + IDENTIFIER_POINTER (TREE_PURPOSE (t))); + } } + for (t = getdecls (); t; t = TREE_CHAIN (t)) { if (TREE_CODE (t) != VAR_DECL && DECL_NAME (t)) |