I use it all the time.
The idiom
while (--ct >= 0)
...
This is not an idiom; the meaning of this construct is exactly what
the rules for that combination of symbols say it is.
has the nice property that if ct is negative coming in [almost], the
Almost, yes. What if it is INT_MIN already?
It also has the property that if ct is zero, it is not executed,
but you didn't catch that because it's not obvious, see below.
body is not executed, which is probably what you want.
This has the stupid property of testing a value that is not the one
which came in. This makes it awkward to think about.
For what values of ct is the loop executed? It is ct - 1 which is tested, not
ct.
while (ct - 1 >= 0)
which is the same thing as
ct >= 1
which is the same as
ct > 0
Aha! Well, doh, why don't you use THAT condition in the fist place???
while (ct-- > 0) {
}
This still has the property of not executing the loop if ct is negative
coming in. It's algebraically equivalent, get it?
Furthermore, maybe you don't want to unconditionally decrement the variable,
whether or not the loop body executes!
If ct comes in as 0 is it okay to make it -1? That's fine if ct has no
next use after the loop.
Variations on the following are generally better:
for (; ct > 0; ct--) {
}
The loop guard controls the loop AND the increment step, which is part
of the loop.
This still has the virtue that the loop is not executed when ct comes
in as zero or negative. Furthermore, it has the virtue that ct is not
touched either if it is zero or negative. (Furthermore, it won't
decrement down from INT_MIN.)
And similar:
for (j = upp; j < low; j++)
...
This is not similar at all.
If you need unsigned for a loop counter, there must be some reason for
doing so.
Like maybe it occurs in code written by someone else you're maintaing?