On 04/12/2010 07:22 PM, Dave Korn wrote: > On 12/04/2010 17:33, Andrew Haley wrote: >> On 04/12/2010 05:27 PM, Bingfeng Mei wrote: >>> Hello, >>> One of our engineers requested a feature so that >>> compiler can avoid to re-load variables after a function >>> call if it is known not to write to memory. It should >>> slash considerable code size in our applications. I found >>> the existing "pure" and "const" cannot meet his requirements >>> because the function is optimized out if it doesn't return >>> a value. >> >> If a function doesn't write to memory and it doesn't return a >> value, what is the point of calling it? > > Delay-loop! That's about the only thing I can think of anyway :-)
I was thinking about non-memory-mapped I/O, a la x86 I/O ports. But yeah. :-) Andrew.