Allan Wind wrote: > On 2006-03-30T12:30:30-0800, [EMAIL PROTECTED] wrote: > > for(int i = 0; i < f(n); ++ i) { > > ... > > } > > Make sure you remove the space between ++ and i.
Why I have to remove the space? Is it well accepted coding convention? > > > If I have the above "for" statement and I compile it with -O3, will the > > function "f(n)" be optimized such that f(n) will only be evaluated > > once. Or I have to factor "f(n)" outside the loop to make sure that it > > only be evaluated once? > > If you compile you example with -S then the assembler file (.s) will > tell you. > > > /Allan > > --Dxnq1zWXvFF0Q93v > Content-Type: application/pgp-signature > Content-Transfer-Encoding: base64 > Content-Disposition: inline; > filename="signature.asc" > Content-Description: Digital signature > X-Google-AttachSize: 190 _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus