Messages in this thread | | | Date | Tue, 1 Jun 2004 12:58:12 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [RFC PATCH] explicitly mark recursion count |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |