Something like printf (Though I read somewhere glibc extension of printf make it non-pure).
Bingfeng > -----Original Message----- > From: gcc-ow...@gcc.gnu.org [mailto:gcc-ow...@gcc.gnu.org] On > Behalf Of Andrew Haley > Sent: 12 April 2010 17:34 > To: gcc@gcc.gnu.org > Subject: Re: Release novops attribute for external use? > > 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? > > Andrew. > >