aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/interface.c
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2011-11-06 22:36:54 +0100
committerJanus Weil <janus@gcc.gnu.org>2011-11-06 22:36:54 +0100
commiteaee02a520c7d5619c310cb43ffc5a58c89ccdc7 (patch)
tree5c2b289cb9d0de3d7f37994ef9efba47a95760a8 /gcc/fortran/interface.c
parent9965f21f9ce932dd77935cd0375085571e8dffa0 (diff)
downloadgcc-eaee02a520c7d5619c310cb43ffc5a58c89ccdc7.zip
gcc-eaee02a520c7d5619c310cb43ffc5a58c89ccdc7.tar.gz
gcc-eaee02a520c7d5619c310cb43ffc5a58c89ccdc7.tar.bz2
gfortran.h (gfc_extend_expr): Modified prototype.
2011-11-06 Janus Weil <janus@gcc.gnu.org> * gfortran.h (gfc_extend_expr): Modified prototype. * interface.c (gfc_extend_expr): Return 'match' instead of 'gfc_try'. Remove argument 'real_error'. * resolve.c (resolve_operator): Modified call to 'gfc_extend_expr'. From-SVN: r181044
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r--gcc/fortran/interface.c23
1 files changed, 9 insertions, 14 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 19ede06..90d98c7 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -3221,12 +3221,11 @@ build_compcall_for_operator (gfc_expr* e, gfc_actual_arglist* actual,
with the operator. This subroutine builds an actual argument list
corresponding to the operands, then searches for a compatible
interface. If one is found, the expression node is replaced with
- the appropriate function call.
- real_error is an additional output argument that specifies if FAILURE
- is because of some real error and not because no match was found. */
+ the appropriate function call. We use the 'match' enum to specify
+ whether a replacement has been made or not, or if an error occurred. */
-gfc_try
-gfc_extend_expr (gfc_expr *e, bool *real_error)
+match
+gfc_extend_expr (gfc_expr *e)
{
gfc_actual_arglist *actual;
gfc_symbol *sym;
@@ -3240,7 +3239,6 @@ gfc_extend_expr (gfc_expr *e, bool *real_error)
actual = gfc_get_actual_arglist ();
actual->expr = e->value.op.op1;
- *real_error = false;
gname = NULL;
if (e->value.op.op2 != NULL)
@@ -3344,16 +3342,16 @@ gfc_extend_expr (gfc_expr *e, bool *real_error)
result = gfc_resolve_expr (e);
if (result == FAILURE)
- *real_error = true;
+ return MATCH_ERROR;
- return result;
+ return MATCH_YES;
}
/* Don't use gfc_free_actual_arglist(). */
free (actual->next);
free (actual);
- return FAILURE;
+ return MATCH_NO;
}
/* Change the expression node to a function call. */
@@ -3366,12 +3364,9 @@ gfc_extend_expr (gfc_expr *e, bool *real_error)
e->user_operator = 1;
if (gfc_resolve_expr (e) == FAILURE)
- {
- *real_error = true;
- return FAILURE;
- }
+ return MATCH_ERROR;
- return SUCCESS;
+ return MATCH_YES;
}