This is the mail archive of the gcc@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]

Re: Loop unrolling


> i has automatic storage, and its address is never taken, so the compiler
> might decide to allocate this object to some 'write-only-memory'.

No, it may not. Modification of i is 'observable behaviour' as per
[intro.execution]/6. So I want to observe this on the machine in front
of me. If the compiler optimizes the loop away, I cannot observe it.
If it would leave the loop, I could observe it, eg. by means of a
debugger.

Regards,
Martin


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