Re: Telling the C optimizer that a pointer's contents won't be modified

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 11 Mar 2021, Jonathan Wakely via Gcc-help wrote:

On Thu, 11 Mar 2021 at 19:35, Hugo Musso Gualandi
<hgualandi@xxxxxxxxxxxxxx> wrote:


> Did you try the access attribute?
> https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html

Oh, I didn't know about this one. But it doesn't seem to change the
generated code... Maybe it is only used for diagnostic error messages?

Yes, it doesn't seem to be used by the optimizers.

There is also the "fn spec" attribute with 'r', but unless you are writing a gcc plugin, you won't be able to use it.

--
Marc Glisse



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux