This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Release novops attribute for external use?
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 :-)
cheers,
DaveK