Exact meaning of __attribute__(__const__)

Florian Weimer fw@deneb.enyo.de
Fri Oct 5 01:42:00 GMT 2001


"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.



More information about the Gcc-help mailing list