This is the mail archive of the
mailing list for the GCC project.
Re: [RFC/PATCH] Standardize on "for (;;)" for unbounded loops
- From: Mike Stump <mrs at apple dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sun, 29 Oct 2006 21:29:28 -0800
- Subject: Re: [RFC/PATCH] Standardize on "for (;;)" for unbounded loops
- References: <Pine.LNX.email@example.com>
On Oct 29, 2006, at 9:54 AM, Roger Sayle wrote:
Now that we're back in stage 1, I'd like to (re)propose the following
minor tweak to GCC's coding style.
 while (1)
 for (;;)
The oracle has considered your request:
$ grep 'while (1)' *.[hc] */*.[ch] */*/*.[ch] | wc -l
$ grep 'for (;;)' *.[hc] */*.[ch] */*/*.[ch] | wc -l
while (1) wins. :-) I personally prefer the while (1) version,
further it is by far, easier on the eyes and brain. I wonder that
google would say. [ pause ] 179,000 for while (1) to 119,000 for for
(;;). Again, the choice is clear.