aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>2005-09-17 20:58:01 +0200
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2005-09-17 18:58:01 +0000
commit31043f6cfc3612e0278f2dea1a8e3ce050b72798 (patch)
tree359a816dbf10dd679ca548628aef0b485522372a /gcc/fortran/expr.c
parent652b0932d7753aec43306dee62e5005492a6cf3c (diff)
downloadgcc-31043f6cfc3612e0278f2dea1a8e3ce050b72798.zip
gcc-31043f6cfc3612e0278f2dea1a8e3ce050b72798.tar.gz
gcc-31043f6cfc3612e0278f2dea1a8e3ce050b72798.tar.bz2
re PR fortran/15586 (gfortran should support i18n in its compiler messages)
PR fortran/15586 * arith.c (gfc_arith_error): Add translation support for error messages. * array.c (gfc_match_array_ref): Likewise. (gfc_match_array_spec): Likewise. * check.c (must_be): Add msgid convention to third argument. (same_type_check): Add translation support for error message. (rank_check): Likewise. (kind_value_check): Likewise. (gfc_check_associated): Correct typo. (gfc_check_reshape): Add translation support for error message. (gfc_check_spread): Likewise. * error.c (error_printf): Add nocmsgid convention to argument. (gfc_warning, gfc_notify_std, gfc_warning_now, gfc_warning_check) (gfc_error, gfc_error_now): Likewise. (gfc_status): Add cmsgid convention to argument. * expr.c (gfc_extract_int): Add translation support for error messages. (gfc_check_conformance): Add msgid convention to argument. (gfc_check_pointer_assign): Correct tabbing. * gfortran.h: Include intl.h header. Remove prototype for gfc_article. * gfortranspec.c: Include intl.h header. (lang_specific_driver): Add translation support for --version. * io.c (check_format): Add translation support for error message. (format_item_1): Likewise. (data_desc): Likewise. * matchexp.c: Likewise. * misc.c (gfc_article): Remove function. * module.c (bad_module): Use msgid convention. Add translation support for error messages. (require_atom): Add translation support for error messages. * parse.c (gfc_ascii_statement): Likewise. (gfc_state_name): Likewise. * primary.c (match_boz_constant): Reorganise error messages for translations. * resolve.c (resolve_entries): Likewise. (resolve_operator): Add translation support for error messages. (gfc_resolve_expr): Use msgid convention. Reorganise error messages for translations. (resolve_symbol): Add translation support for error messages. * symbol.c (gfc_add_procedure): Remove use of gfc_article function. * trans-const.c (gfc_build_string_const): Use msgid convention. * exgettext: Add a new nocmsgid convention for arguments that should be marked as no-c-format. * gcc.pot: Regenerate. From-SVN: r104372
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c21
1 files changed, 12 insertions, 9 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index e361371..78b811a 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -255,15 +255,15 @@ gfc_extract_int (gfc_expr * expr, int *result)
{
if (expr->expr_type != EXPR_CONSTANT)
- return "Constant expression required at %C";
+ return _("Constant expression required at %C");
if (expr->ts.type != BT_INTEGER)
- return "Integer expression required at %C";
+ return _("Integer expression required at %C");
if ((mpz_cmp_si (expr->value.integer, INT_MAX) > 0)
|| (mpz_cmp_si (expr->value.integer, INT_MIN) < 0))
{
- return "Integer value too large in expression at %C";
+ return _("Integer value too large in expression at %C");
}
*result = (int) mpz_get_si (expr->value.integer);
@@ -1753,7 +1753,8 @@ gfc_specification_expr (gfc_expr * e)
/* Given two expressions, make sure that the arrays are conformable. */
try
-gfc_check_conformance (const char *optype, gfc_expr * op1, gfc_expr * op2)
+gfc_check_conformance (const char *optype_msgid,
+ gfc_expr * op1, gfc_expr * op2)
{
int op1_flag, op2_flag, d;
mpz_t op1_size, op2_size;
@@ -1764,7 +1765,8 @@ gfc_check_conformance (const char *optype, gfc_expr * op1, gfc_expr * op2)
if (op1->rank != op2->rank)
{
- gfc_error ("Incompatible ranks in %s at %L", optype, &op1->where);
+ gfc_error ("Incompatible ranks in %s at %L", _(optype_msgid),
+ &op1->where);
return FAILURE;
}
@@ -1778,7 +1780,8 @@ gfc_check_conformance (const char *optype, gfc_expr * op1, gfc_expr * op2)
if (op1_flag && op2_flag && mpz_cmp (op1_size, op2_size) != 0)
{
gfc_error ("%s at %L has different shape on dimension %d (%d/%d)",
- optype, &op1->where, d + 1, (int) mpz_get_si (op1_size),
+ _(optype_msgid), &op1->where, d + 1,
+ (int) mpz_get_si (op1_size),
(int) mpz_get_si (op2_size));
t = FAILURE;
@@ -1920,7 +1923,7 @@ gfc_check_pointer_assign (gfc_expr * lvalue, gfc_expr * rvalue)
if (lvalue->ts.kind != rvalue->ts.kind)
{
- gfc_error ("Different kind type parameters in pointer "
+ gfc_error ("Different kind type parameters in pointer "
"assignment at %L", &lvalue->where);
return FAILURE;
}
@@ -1928,14 +1931,14 @@ gfc_check_pointer_assign (gfc_expr * lvalue, gfc_expr * rvalue)
attr = gfc_expr_attr (rvalue);
if (!attr.target && !attr.pointer)
{
- gfc_error ("Pointer assignment target is neither TARGET "
+ gfc_error ("Pointer assignment target is neither TARGET "
"nor POINTER at %L", &rvalue->where);
return FAILURE;
}
if (is_pure && gfc_impure_variable (rvalue->symtree->n.sym))
{
- gfc_error ("Bad target in pointer assignment in PURE "
+ gfc_error ("Bad target in pointer assignment in PURE "
"procedure at %L", &rvalue->where);
}