I wrote:
> Hmph. There's an "assert(depth >= 0)" immediately in front of that,
> so I'm not looking too kindly on the compiler thinking it's smarter
> than I am. Do you have a suggestion on how to shut it up?
On reflection, maybe the thing to do is convert the assert into
an always-on check, "if (depth < 0) return false". The assertion
is essentially saying that there's no arc leading directly from
the pre state to the post state. Which there had better not be,
or a lot of other stuff is going to go wrong; but I suppose there's
no way to explain that to gcc. It is annoying to have to expend
an always-on check for a can't-happen case, though.
regards, tom lane