On 06/19/2011 02:21 PM, Eric Anholt wrote:
On Sat, 18 Jun 2011 09:29:32 +0200, Keith Packard<kei...@keithp.com>  wrote:
On Fri, 17 Jun 2011 17:43:14 -0700, Dan McCabe<zen3d.li...@gmail.com>  wrote:

                break; // implicit exit from loop at end of switch
        } while (true);
Seems like this could just be

         } while (false);

as I don't see any way the loop could go around more than once.
"while (true)" is the instruction available in the hardware, this isn't
a description of C code.
Correct. It is primarily intended to explain approximately an equivalent for the underlying code and is intended to interpreted with a grain of salt. It is really pseudo-code that looks a lot like C :).

I also wanted to use "while(true)" to explicitly indicate the actual effect of the implicit "break" at the end of the "loop". With "while(false)", you have to scratch your head to figure out why that final "break" is there, because it ought not be needed in a "while(false)" loop.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to