[patch] rtl iv analysis merge from killloop branch (again)

Paolo Bonzini paolo.bonzini@lu.unisi.ch
Thu Jan 19 16:51:00 GMT 2006


> p.s. To the other GCC maintainers, is there any preference in the GNU
> coding style for the idiom to use for infinite loops?  At OpenEye, we
> recommend "for (;;)" over "while (1)" to silence the MIPSPro compiler's
> annoying "control variable is a constant" warnings, but I'm unsure if
> the GNU project has a policy on this topic.  Seeing the "while (1)"s
> in Zdenek's patch reminded me to ask?

Off the top of my head, I would have said "for (;;)" -- that's what I 
use at least.  On the other hand...

$ cat * config/*/* | grep -c 'while (1)'
153
$ cat * config/*/* | grep -c 'for (;;)'
69

So there seems to be a preference (70%-30%) for "while (1)".

Thanks for reviewing the killloop patches!

Paolo



More information about the Gcc-patches mailing list