diff options
author | Janus Weil <janus@gcc.gnu.org> | 2018-09-20 21:33:05 +0200 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2018-09-20 21:33:05 +0200 |
commit | 2eb3745a7bcd7f326b44f784d2f0ca6a2fd4080d (patch) | |
tree | 230e5d690dc909163e13b97662b3920ae08ffa7b /gcc/fortran/decl.c | |
parent | 5596651acde99a5826a6ebf63afaf1a9fabc36e7 (diff) | |
download | gcc-2eb3745a7bcd7f326b44f784d2f0ca6a2fd4080d.zip gcc-2eb3745a7bcd7f326b44f784d2f0ca6a2fd4080d.tar.gz gcc-2eb3745a7bcd7f326b44f784d2f0ca6a2fd4080d.tar.bz2 |
gfortran.h (gfc_str_startswith): New macro.
2018-09-20 Janus Weil <janus@gcc.gnu.org>
* gfortran.h (gfc_str_startswith): New macro.
* decl.c (variable_decl, gfc_match_end): Use it.
* iresolve.c (is_trig_resolved): Ditto.
* module.c (load_omp_udrs, read_module): Ditto.
* options.c (gfc_handle_runtime_check_option): Ditto.
* primary.c (match_arg_list_function): Ditto.
* trans-decl.c (gfc_get_symbol_decl): Ditto.
* trans-expr.c (gfc_conv_procedure_call): Ditto.
* interface.c (dtio_op): Replace strncmp by strcmp.
* resolve.c (resolve_actual_arglist, resolve_function): Ditto.
* trans-expr.c (conv_arglist_function): Ditto.
* trans-intrinsic.c (gfc_conv_ieee_arithmetic_function): Replace macro
STARTS_WITH by gfc_str_startswith.
From-SVN: r264448
Diffstat (limited to 'gcc/fortran/decl.c')
-rw-r--r-- | gcc/fortran/decl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/decl.c b/gcc/fortran/decl.c index 3d19ad4..91a1f34 100644 --- a/gcc/fortran/decl.c +++ b/gcc/fortran/decl.c @@ -2529,7 +2529,7 @@ variable_decl (int elem) } /* %FILL components may not have initializers. */ - if (strncmp (name, "%FILL", 5) == 0 && gfc_match_eos () != MATCH_YES) + if (gfc_str_startswith (name, "%FILL") && gfc_match_eos () != MATCH_YES) { gfc_error ("%qs entity cannot have an initializer at %C", "%FILL"); m = MATCH_ERROR; @@ -7811,7 +7811,7 @@ gfc_match_end (gfc_statement *st) { case COMP_ASSOCIATE: case COMP_BLOCK: - if (!strncmp (block_name, "block@", strlen("block@"))) + if (gfc_str_startswith (block_name, "block@")) block_name = NULL; break; |