diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-06-06 21:31:40 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2005-06-06 21:31:40 +0200 |
commit | 4b794eaf73ef8df7689d1e9de146e00398f2d1fd (patch) | |
tree | c8a8fb885e6d7542f092ff09cfbce8b498ccf63e /gcc/c-typeck.c | |
parent | 6be74c4f5c988270ef3e4d4664a15b2b2e205f9a (diff) | |
download | gcc-4b794eaf73ef8df7689d1e9de146e00398f2d1fd.zip gcc-4b794eaf73ef8df7689d1e9de146e00398f2d1fd.tar.gz gcc-4b794eaf73ef8df7689d1e9de146e00398f2d1fd.tar.bz2 |
exgettext: Handle gmsgid and cmsgid arguments specially, as gcc-internal-format and c-format.
gcc/po/
* exgettext: Handle gmsgid and cmsgid arguments specially,
as gcc-internal-format and c-format. Because of xgettext
bug, invoke xgettext once with --language=c, once with
--language=GCC-source and then merge together. Fail if
xgettext is not 0.14.5 or later.
gcc/
* intl.h (G_): New macro.
* rtl-error.c (error_for_asm, warning_for_asm): Use gmsgid
instead of msgid for argument name.
* tree-ssa.c (warn_uninit): Likewise.
* c-parser.c (c_parser_error): Likewise.
* config/rs6000/rs6000-c.c (SYNTAX_ERROR): Likewise.
* config/darwin-c.c (BAD): Likewise.
* config/c4x/c4x-c.c (BAD): Likewise.
* c-pragma.c (GCC_BAD, GCC_BAD2): Likewise.
* c-errors.c (pedwarn_c99, pedwarn_c90): Likewise.
* c-common.c (c_parse_error): Likewise.
* diagnostic.c (diagnostic_set_info, verbatim, inform, warning,
warning0, pedwarn, error, sorry, fatal_error, internal_error):
Likewise.
(fnotice): Use cmsgid instead of msgid for argument name.
* gcov.c (fnotice): Likewise.
* protoize.c (notice): Likewise.
* final.c (output_operand_lossage): Likewise.
* gcc.c (fatal, notice): Likewise.
(error): Use gmsgid instead of msgid for argument name.
* collect2.c (notice, fatal_perror, fatal): Use cmsgid instead
of msgid for argument name.
(error): Use gmsgid instead of msgid for argument name.
* c-decl.c (locate_old_decl, implicit_decl_warning): Use G_()
instead of N_().
* c-typeck.c (readonly_error, convert_for_assignment): Likewise.
* tree-inline.c (inline_forbidden_p_1): Likewise.
* ABOUT-GCC-NLS: Require gettext 0.14.5 or later. Mention the new
conventions for marking translations.
* doc/install.texi: Mention gettext 0.14.5 or later requirement.
gcc/cp/
* error.c (locate_error): Use gmsgid instead of msgid for argument
name.
(cp_error_at, cp_warning_at, cp_pedwarn_at): Likewise.
gcc/java/
* jv-scan.c (fatal_error, warning, warning0): Use gmsgid instead of
msgid for argument name.
* gjavah.c (error): Likewise.
* java-tree.h (parse_error_context): Likewise.
* parse.y (parse_error_context, parse_warning_context,
issue_warning_error_from_context): Likewise.
From-SVN: r100676
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r-- | gcc/c-typeck.c | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 9d41433..25a280a 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -2845,20 +2845,20 @@ readonly_error (tree arg, enum lvalue_use use) if (TYPE_READONLY (TREE_TYPE (TREE_OPERAND (arg, 0)))) readonly_error (TREE_OPERAND (arg, 0), use); else - error (READONLY_MSG (N_("assignment of read-only member %qD"), - N_("increment of read-only member %qD"), - N_("decrement of read-only member %qD")), + error (READONLY_MSG (G_("assignment of read-only member %qD"), + G_("increment of read-only member %qD"), + G_("decrement of read-only member %qD")), TREE_OPERAND (arg, 1)); } else if (TREE_CODE (arg) == VAR_DECL) - error (READONLY_MSG (N_("assignment of read-only variable %qD"), - N_("increment of read-only variable %qD"), - N_("decrement of read-only variable %qD")), + error (READONLY_MSG (G_("assignment of read-only variable %qD"), + G_("increment of read-only variable %qD"), + G_("decrement of read-only variable %qD")), arg); else - error (READONLY_MSG (N_("assignment of read-only location"), - N_("increment of read-only location"), - N_("decrement of read-only location"))); + error (READONLY_MSG (G_("assignment of read-only location"), + G_("increment of read-only location"), + G_("decrement of read-only location"))); } @@ -3728,26 +3728,26 @@ convert_for_assignment (tree type, tree rhs, enum impl_conv errtype, function where an ordinary one is wanted, but not vice-versa. */ if (TYPE_QUALS (ttl) & ~TYPE_QUALS (ttr)) - WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE " + WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE " "makes qualified function " "pointer from unqualified"), - N_("assignment makes qualified " + G_("assignment makes qualified " "function pointer from " "unqualified"), - N_("initialization makes qualified " + G_("initialization makes qualified " "function pointer from " "unqualified"), - N_("return makes qualified function " + G_("return makes qualified function " "pointer from unqualified")); } else if (TYPE_QUALS (ttr) & ~TYPE_QUALS (ttl)) - WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE discards " + WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE discards " "qualifiers from pointer target type"), - N_("assignment discards qualifiers " + G_("assignment discards qualifiers " "from pointer target type"), - N_("initialization discards qualifiers " + G_("initialization discards qualifiers " "from pointer target type"), - N_("return discards qualifiers from " + G_("return discards qualifiers from " "pointer target type")); } @@ -3796,14 +3796,14 @@ convert_for_assignment (tree type, tree rhs, enum impl_conv errtype, which are not ANSI null ptr constants. */ && (!integer_zerop (rhs) || TREE_CODE (rhs) == NOP_EXPR) && TREE_CODE (ttl) == FUNCTION_TYPE))) - WARN_FOR_ASSIGNMENT (N_("ISO C forbids passing argument %d of " + WARN_FOR_ASSIGNMENT (G_("ISO C forbids passing argument %d of " "%qE between function pointer " "and %<void *%>"), - N_("ISO C forbids assignment between " + G_("ISO C forbids assignment between " "function pointer and %<void *%>"), - N_("ISO C forbids initialization between " + G_("ISO C forbids initialization between " "function pointer and %<void *%>"), - N_("ISO C forbids return between function " + G_("ISO C forbids return between function " "pointer and %<void *%>")); /* Const and volatile mean something different for function types, so the usual warnings are not appropriate. */ @@ -3816,13 +3816,13 @@ convert_for_assignment (tree type, tree rhs, enum impl_conv errtype, qualifier are acceptable if the 'volatile' has been added in by the Objective-C EH machinery. */ if (!objc_type_quals_match (ttl, ttr)) - WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE discards " + WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE discards " "qualifiers from pointer target type"), - N_("assignment discards qualifiers " + G_("assignment discards qualifiers " "from pointer target type"), - N_("initialization discards qualifiers " + G_("initialization discards qualifiers " "from pointer target type"), - N_("return discards qualifiers from " + G_("return discards qualifiers from " "pointer target type")); } /* If this is not a case of ignoring a mismatch in signedness, @@ -3832,13 +3832,13 @@ convert_for_assignment (tree type, tree rhs, enum impl_conv errtype, ; /* If there is a mismatch, do warn. */ else if (warn_pointer_sign) - WARN_FOR_ASSIGNMENT (N_("pointer targets in passing argument " + WARN_FOR_ASSIGNMENT (G_("pointer targets in passing argument " "%d of %qE differ in signedness"), - N_("pointer targets in assignment " + G_("pointer targets in assignment " "differ in signedness"), - N_("pointer targets in initialization " + G_("pointer targets in initialization " "differ in signedness"), - N_("pointer targets in return differ " + G_("pointer targets in return differ " "in signedness")); } else if (TREE_CODE (ttl) == FUNCTION_TYPE @@ -3849,26 +3849,26 @@ convert_for_assignment (tree type, tree rhs, enum impl_conv errtype, it is okay to use a const or volatile function where an ordinary one is wanted, but not vice-versa. */ if (TYPE_QUALS (ttl) & ~TYPE_QUALS (ttr)) - WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE makes " + WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE makes " "qualified function pointer " "from unqualified"), - N_("assignment makes qualified function " + G_("assignment makes qualified function " "pointer from unqualified"), - N_("initialization makes qualified " + G_("initialization makes qualified " "function pointer from unqualified"), - N_("return makes qualified function " + G_("return makes qualified function " "pointer from unqualified")); } } else /* Avoid warning about the volatile ObjC EH puts on decls. */ if (!objc_ok) - WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE from " + WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE from " "incompatible pointer type"), - N_("assignment from incompatible pointer type"), - N_("initialization from incompatible " + G_("assignment from incompatible pointer type"), + G_("initialization from incompatible " "pointer type"), - N_("return from incompatible pointer type")); + G_("return from incompatible pointer type")); return convert (type, rhs); } @@ -3890,26 +3890,26 @@ convert_for_assignment (tree type, tree rhs, enum impl_conv errtype, && TREE_CODE (TREE_TYPE (rhs)) == INTEGER_TYPE && TREE_CODE (TREE_OPERAND (rhs, 0)) == INTEGER_CST && integer_zerop (TREE_OPERAND (rhs, 0)))) - WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE makes " + WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE makes " "pointer from integer without a cast"), - N_("assignment makes pointer from integer " + G_("assignment makes pointer from integer " "without a cast"), - N_("initialization makes pointer from " + G_("initialization makes pointer from " "integer without a cast"), - N_("return makes pointer from integer " + G_("return makes pointer from integer " "without a cast")); return convert (type, rhs); } else if (codel == INTEGER_TYPE && coder == POINTER_TYPE) { - WARN_FOR_ASSIGNMENT (N_("passing argument %d of %qE makes integer " + WARN_FOR_ASSIGNMENT (G_("passing argument %d of %qE makes integer " "from pointer without a cast"), - N_("assignment makes integer from pointer " + G_("assignment makes integer from pointer " "without a cast"), - N_("initialization makes integer from pointer " + G_("initialization makes integer from pointer " "without a cast"), - N_("return makes integer from pointer " + G_("return makes integer from pointer " "without a cast")); return convert (type, rhs); } |