On Sat, 2011-01-29 at 13:22 +0100, Philipp Überbacher wrote:
Without optimisation the output is quite
different, but beginning with -O2 the machine code appears all the same.
That's because your 2048 is static, and nothing is happening in the
loop, therefore gcc can optimise way more stuff away than in the real
code, because it "knows" that buffer size is always 2048 and that k is
not used inside the loop.
Peter.