This is the mail archive of the gcc-help@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]

Re: Exact meaning of __attribute__(__const__)


"Matthias Clasen" <matthiasc@poet.de> writes:

> The gcc manual states that const functions may not read global
> memory.
>
> Is it really that strict or is it permittable for a const function
> to read global memory which doesn't change over time (which I've
> heard) ?

I'd be surprised if const functions are even permitted to change
global memory.  Otherwise, you couldn't implement memoizing.


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