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]
Other format: [Raw text]

RE: Release novops attribute for external use?


Something like printf (Though I read somewhere glibc extension of printf 
make it non-pure). 

Bingfeng  

> -----Original Message-----
> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@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.
> 
> 


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