This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC/PATCH] Standardize on "for (;;)" for unbounded loops


Dirk Mueller writes:
 > On Monday 30 October 2006 06:29, Mike Stump wrote:
 > 
 > > while (1) wins.  :-) 
 > 
 > I would prefer "for(;;)" because you can easily read it as "for..ever" if you 
 > once grasped this (strange) construct. 

+1

  for (;;)   struck me as rather odd when I first read it in K&R, but that
was a very long time ago.  K&R seem to have used it as the standard
idiom for an infinte loop, and it's also used that way in UNIX 6th. Ed.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]