aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2016-12-13 19:55:20 +0100
committerJanus Weil <janus@gcc.gnu.org>2016-12-13 19:55:20 +0100
commit7a28353e36d0c2b1dc81883437d2064a50c00e8e (patch)
tree9d1e9d025f22b461e270aae2ebd39ebc4c5a4ffb /gcc/fortran/resolve.c
parentc3c54e0f074083d3bdfe97153a704f5584ec3fa4 (diff)
downloadgcc-7a28353e36d0c2b1dc81883437d2064a50c00e8e.zip
gcc-7a28353e36d0c2b1dc81883437d2064a50c00e8e.tar.gz
gcc-7a28353e36d0c2b1dc81883437d2064a50c00e8e.tar.bz2
re PR fortran/78798 ([cleanup] some int-valued functions should be bool)
2016-12-13 Janus Weil <janus@gcc.gnu.org> PR fortran/78798 * gfortran.h (gfc_is_constant_expr, gfc_is_formal_arg, gfc_is_compile_time_shape): Return bool instead of int. * array.c (gfc_is_compile_time_shape): Ditto. * expr.c (gfc_is_constant_expr): Ditto. * resolve.c (gfc_is_formal_arg): Ditto. Make formal_arg_flag bool. From-SVN: r243621
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index ce1d9ea..2c70e6c 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -72,9 +72,9 @@ static bool first_actual_arg = false;
static int omp_workshare_flag;
-/* Nonzero if we are processing a formal arglist. The corresponding function
+/* True if we are processing a formal arglist. The corresponding function
resets the flag each time that it is read. */
-static int formal_arg_flag = 0;
+static bool formal_arg_flag = false;
/* True if we are resolving a specification expression. */
static bool specification_expr = false;
@@ -89,7 +89,7 @@ static bitmap_obstack labels_obstack;
static bool inquiry_argument = false;
-int
+bool
gfc_is_formal_arg (void)
{
return formal_arg_flag;
@@ -285,7 +285,7 @@ resolve_formal_arglist (gfc_symbol *proc)
sym->attr.always_explicit = 1;
}
- formal_arg_flag = 1;
+ formal_arg_flag = true;
for (f = proc->formal; f; f = f->next)
{
@@ -530,7 +530,7 @@ resolve_formal_arglist (gfc_symbol *proc)
}
}
}
- formal_arg_flag = 0;
+ formal_arg_flag = false;
}
@@ -14722,14 +14722,14 @@ resolve_symbol (gfc_symbol *sym)
an error for host associated variables in the specification
expression for an array_valued function. */
if (sym->attr.function && sym->as)
- formal_arg_flag = 1;
+ formal_arg_flag = true;
saved_specification_expr = specification_expr;
specification_expr = true;
gfc_resolve_array_spec (sym->as, check_constant);
specification_expr = saved_specification_expr;
- formal_arg_flag = 0;
+ formal_arg_flag = false;
/* Resolve formal namespaces. */
if (sym->formal_ns && sym->formal_ns != gfc_current_ns