public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-5629] Add comment to indicate tail recursion
@ 2021-11-30 14:27 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-11-30 14:27 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:26493af58a1297d5d9fbb061694416deaee71220

commit r12-5629-g26493af58a1297d5d9fbb061694416deaee71220
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Nov 30 15:25:17 2021 +0100

    Add comment to indicate tail recursion
    
    My previous change removed an unreachable break; there (an
    unreachable continue; would have been more to the point).  The
    following re-adds a comment explaining that WALK_SUBEXPR_TAIL
    does not fall through but tail recurses.
    
    2021-11-30  Richard Biener  <rguenther@suse.de>
    
    gcc/fortran/
            * frontend-passes.c (gfc_expr_walker): Add comment to
            indicate tail recursion.

Diff:
---
 gcc/fortran/frontend-passes.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/fortran/frontend-passes.c b/gcc/fortran/frontend-passes.c
index 16ee2afc9c0..4764c834f4f 100644
--- a/gcc/fortran/frontend-passes.c
+++ b/gcc/fortran/frontend-passes.c
@@ -5229,6 +5229,7 @@ gfc_expr_walker (gfc_expr **e, walk_expr_fn_t exprfn, void *data)
 	  case EXPR_OP:
 	    WALK_SUBEXPR ((*e)->value.op.op1);
 	    WALK_SUBEXPR_TAIL ((*e)->value.op.op2);
+	    /* No fallthru because of the tail recursion above.  */
 	  case EXPR_FUNCTION:
 	    for (a = (*e)->value.function.actual; a; a = a->next)
 	      WALK_SUBEXPR (a->expr);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-11-30 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 14:27 [gcc r12-5629] Add comment to indicate tail recursion Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).