a question about const and pure functions.

Steven Bosscher stevenb@suse.de
Thu Nov 11 15:26:00 GMT 2004


On Nov 11, 2004 04:12 PM, Richard Kenner <kenner@vlsi1.ultra.nyu.edu> wrote:
> "The devil is in the details", as they say!

Very true.

>  Is memoization considered a
> "side-effect", for example?  What about a function passed a pointer
> and which indirectly modifies that point?  Is that a "side-effect"?
> It's very tricky to get definitions exactly right.

So write it down.

But your example is obvious - if the function is passed a pointer
and it modifies it, that is clearly a side-effect because it is a
a change that cannot be seen directly from the caller's side.

Gr.
Steven




More information about the Gcc mailing list