Re: [RFC PATCH] explicitly mark recursion count

Linus Torvalds
2004-06-01T19:59:43Z

On Tue, 1 Jun 2004, Horst von Brand wrote:
>
> If the comment gets out of sync, you are toast. Too easy for that to
> happen, IMVHO.

Yes.

Recursion should be detectable automatically, the only thing you can't
detect easily is the reason to _break_ recursion.

So how about just having a simple loop finder, and then the only comment
you need is a simple /* max recursion: N */ for any point in the loop.

That still makes it interesting if one function is part of two loops, and
is logically the place that breaks the recursion for one (or both - with
different logic) of them. But does that actually happen?

Linus