diff options
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index 02e6dc1..d7fc6c4 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -41,7 +41,6 @@ match_kind_param (int *kind, int *is_iso_c) { char name[GFC_MAX_SYMBOL_LEN + 1]; gfc_symbol *sym; - const char *p; match m; *is_iso_c = 0; @@ -68,8 +67,7 @@ match_kind_param (int *kind, int *is_iso_c) if (sym->value == NULL) return MATCH_NO; - p = gfc_extract_int (sym->value, kind); - if (p != NULL) + if (gfc_extract_int (sym->value, kind)) return MATCH_NO; gfc_set_sym_referenced (sym); @@ -257,7 +255,6 @@ match_hollerith_constant (gfc_expr **result) { locus old_loc; gfc_expr *e = NULL; - const char *msg; int num, pad; int i; @@ -270,12 +267,8 @@ match_hollerith_constant (gfc_expr **result) if (!gfc_notify_std (GFC_STD_LEGACY, "Hollerith constant at %C")) goto cleanup; - msg = gfc_extract_int (e, &num); - if (msg != NULL) - { - gfc_error (msg); - goto cleanup; - } + if (gfc_extract_int (e, &num, 1)) + goto cleanup; if (num == 0) { gfc_error ("Invalid Hollerith constant: %L must contain at least " @@ -1017,7 +1010,6 @@ match_string_constant (gfc_expr **result) locus old_locus, start_locus; gfc_symbol *sym; gfc_expr *e; - const char *q; match m; gfc_char_t c, delimiter, *p; @@ -1082,12 +1074,8 @@ match_string_constant (gfc_expr **result) if (kind == -1) { - q = gfc_extract_int (sym->value, &kind); - if (q != NULL) - { - gfc_error (q); - return MATCH_ERROR; - } + if (gfc_extract_int (sym->value, &kind, 1)) + return MATCH_ERROR; gfc_set_sym_referenced (sym); } @@ -1659,7 +1647,7 @@ match_keyword_arg (gfc_actual_arglist *actual, gfc_actual_arglist *base) } } - actual->name = gfc_get_string (name); + actual->name = gfc_get_string ("%s", name); return MATCH_YES; cleanup: |