diff options
author | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2021-11-06 06:48:00 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2023-05-18 21:48:22 +0200 |
commit | c072df1ab144506cd8bb0ac81fb8f1aad69f0bd2 (patch) | |
tree | 1e8f2ed2984203240c319f846f62a57896e16190 /gcc/fortran/scanner.cc | |
parent | fe7b9c2e21e15db44af95aeca279971e05d7a089 (diff) | |
download | gcc-c072df1ab144506cd8bb0ac81fb8f1aad69f0bd2.zip gcc-c072df1ab144506cd8bb0ac81fb8f1aad69f0bd2.tar.gz gcc-c072df1ab144506cd8bb0ac81fb8f1aad69f0bd2.tar.bz2 |
Fortran: Narrow return types [PR78798]
gcc/fortran/ChangeLog:
PR fortran/78798
* array.cc (compare_bounds): Use narrower return type.
(gfc_compare_array_spec): Likewise.
(is_constant_element): Likewise.
(gfc_constant_ac): Likewise.
* check.cc (dim_rank_check): Likewise.
* cpp.cc (gfc_cpp_init_options): Likewise.
(dump_macro): Likewise.
* cpp.h (gfc_cpp_handle_option): Likewise.
* dependency.cc (gfc_ref_needs_temporary_p): Likewise.
(gfc_check_argument_dependency): Likewise.
(gfc_check_fncall_dependency): Likewise.
(ref_same_as_full_array): Likewise.
* dependency.h (gfc_check_fncall_dependency): Likewise.
(gfc_dep_resolver): Likewise.
(gfc_are_equivalenced_arrays): Likewise.
* expr.cc (gfc_copy_ref): Likewise.
(gfc_kind_max): Likewise.
(numeric_type): Likewise.
* gfortran.h (gfc_at_end): Likewise.
(gfc_at_eof): Likewise.
(gfc_at_bol): Likewise.
(gfc_at_eol): Likewise.
(gfc_define_undef_line): Likewise.
(gfc_wide_is_printable): Likewise.
(gfc_wide_is_digit): Likewise.
(gfc_wide_fits_in_byte): Likewise.
(gfc_find_sym_tree): Likewise.
(gfc_generic_intrinsic): Likewise.
(gfc_specific_intrinsic): Likewise.
(gfc_intrinsic_actual_ok): Likewise.
(gfc_has_vector_index): Likewise.
(gfc_numeric_ts): Likewise.
(gfc_impure_variable): Likewise.
(gfc_pure): Likewise.
(gfc_implicit_pure): Likewise.
(gfc_elemental): Likewise.
(gfc_pure_function): Likewise.
(gfc_implicit_pure_function): Likewise.
(gfc_compare_array_spec): Likewise.
(gfc_constant_ac): Likewise.
(gfc_expanded_ac): Likewise.
(gfc_check_digit): Likewise.
* intrinsic.cc (gfc_find_subroutine): Likewise.
(gfc_generic_intrinsic): Likewise.
(gfc_specific_intrinsic): Likewise.
* io.cc (compare_to_allowed_values): Likewise. And remove
unneeded forward declaration.
* parse.cc: Likewise.
* parse.h (gfc_check_do_variable): Likewise.
* primary.cc (gfc_check_digit): Likewise.
* resolve.cc (resolve_structure_cons): Likewise.
(pure_stmt_function): Likewise.
(gfc_pure_function): Likewise.
(impure_stmt_fcn): Likewise.
(resolve_forall_iterators): Likewise.
(resolve_data): Likewise.
(gfc_impure_variable): Likewise.
(gfc_pure): Likewise.
(gfc_unset_implicit_pure): Likewise.
* scanner.cc (wide_is_ascii): Likewise.
(gfc_wide_toupper): Likewise.
(gfc_open_included_file): Likewise.
(gfc_at_end): Likewise.
(gfc_at_eof): Likewise.
(gfc_at_bol): Likewise.
(skip_comment_line): Likewise.
(gfc_gobble_whitespace): Likewise.
* symbol.cc (gfc_find_symtree_in_proc): Likewise.
* trans-array.cc: Likewise.
* trans-decl.cc (gfc_set_decl_assembler_name): Likewise.
* trans-types.cc (gfc_get_element_type): Likewise.
(gfc_add_field_to_struct): Likewise.
* trans-types.h (gfc_copy_dt_decls_ifequal): Likewise.
(gfc_return_by_reference): Likewise.
(gfc_is_nodesc_array): Likewise.
* trans.h (gfc_can_put_var_on_stack): Likewise.
Diffstat (limited to 'gcc/fortran/scanner.cc')
-rw-r--r-- | gcc/fortran/scanner.cc | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/fortran/scanner.cc b/gcc/fortran/scanner.cc index 4f45da446..9f0d9a7 100644 --- a/gcc/fortran/scanner.cc +++ b/gcc/fortran/scanner.cc @@ -56,7 +56,7 @@ gfc_directorylist *include_dirs, *intrinsic_modules_dirs; static gfc_file *file_head, *current_file; -static int continue_flag, end_flag, gcc_attribute_flag; +static bool continue_flag, end_flag, gcc_attribute_flag; /* If !$omp/!$acc occurred in current comment line. */ static int openmp_flag, openacc_flag; static int continue_count, continue_line; @@ -86,7 +86,7 @@ static gfc_char_t *last_error_char; /* Functions dealing with our wide characters (gfc_char_t) and sequences of such characters. */ -int +bool gfc_wide_fits_in_byte (gfc_char_t c) { return (c <= UCHAR_MAX); @@ -98,7 +98,7 @@ wide_is_ascii (gfc_char_t c) return (gfc_wide_fits_in_byte (c) && ((unsigned char) c & ~0x7f) == 0); } -int +bool gfc_wide_is_printable (gfc_char_t c) { return (gfc_wide_fits_in_byte (c) && ISPRINT ((unsigned char) c)); @@ -116,7 +116,7 @@ gfc_wide_toupper (gfc_char_t c) return (wide_is_ascii (c) ? (gfc_char_t) TOUPPER((unsigned char) c) : c); } -int +bool gfc_wide_is_digit (gfc_char_t c) { return (c >= '0' && c <= '9'); @@ -518,7 +518,7 @@ gfc_open_included_file (const char *name, bool include_cwd, bool module) /* Test to see if we're at the end of the main source file. */ -int +bool gfc_at_end (void) { return end_flag; @@ -527,7 +527,7 @@ gfc_at_end (void) /* Test to see if we're at the end of the current file. */ -int +bool gfc_at_eof (void) { if (gfc_at_end ()) @@ -545,7 +545,7 @@ gfc_at_eof (void) /* Test to see if we're at the beginning of a new line. */ -int +bool gfc_at_bol (void) { if (gfc_at_eof ()) @@ -557,7 +557,7 @@ gfc_at_bol (void) /* Test to see if we're at the end of a line. */ -int +bool gfc_at_eol (void) { if (gfc_at_eof ()) @@ -702,7 +702,7 @@ skip_comment_line (void) } -int +bool gfc_define_undef_line (void) { char *tmp; @@ -1803,7 +1803,7 @@ gfc_gobble_whitespace (void) easily report line and column numbers consistent with other parts of gfortran. */ -static int +static bool load_line (FILE *input, gfc_char_t **pbuf, int *pbuflen, const int *first_char) { int c, maxlen, i, preprocessor_flag, buflen = *pbuflen; |