Commit 77b29023 by Jakub Jelinek

* arith.c (character2representation): Change i type to size_t.

From-SVN: r277978
parent d308ca27
2019-11-08 Jakub Jelinek <jakub@redhat.com>
* arith.c (character2representation): Change i type to size_t.
2019-11-08 Mark Eggleston <mark.eggleston@codethink.com> 2019-11-08 Mark Eggleston <mark.eggleston@codethink.com>
Jim MacArthur <jim.macarthur@codethink.co.uk> Jim MacArthur <jim.macarthur@codethink.co.uk>
* arith.c (hollerith2representation): Use OPT_Wcharacter_truncation in * arith.c (hollerith2representation): Use OPT_Wcharacter_truncation in
call to gfc_warning. Add character2representation, gfc_character2int, call to gfc_warning.
gfc_character2real, gfc_character2complex and gfc_character2logical. (character2representation, gfc_character2int, gfc_character2real,
* arith.h: Add prototypes for gfc_character2int, gfc_character2real, gfc_character2complex and gfc_character2logical): New.
gfc_character2complex and gfc_character2logical. * arith.h (gfc_character2int, gfc_character2real, gfc_character2complex,
gfc_character2logical): Declare.
* expr.c (gfc_check_assign): Return true if left hand side is numeric * expr.c (gfc_check_assign): Return true if left hand side is numeric
or logical and the right hand side is character and of kind=1. or logical and the right hand side is character and of kind=1.
* gfortran.texi: Add -fdec-char-conversions. * gfortran.texi: Add -fdec-char-conversions.
......
...@@ -2534,8 +2534,7 @@ hollerith2representation (gfc_expr *result, gfc_expr *src) ...@@ -2534,8 +2534,7 @@ hollerith2representation (gfc_expr *result, gfc_expr *src)
static void static void
character2representation (gfc_expr *result, gfc_expr *src) character2representation (gfc_expr *result, gfc_expr *src)
{ {
size_t src_len, result_len; size_t src_len, result_len, i;
int i;
src_len = src->value.character.length; src_len = src->value.character.length;
gfc_target_expr_size (result, &result_len); gfc_target_expr_size (result, &result_len);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment