This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [patch] 2 patches for PR tree-optimization/34648


Richard Kenner wrote:
Are you sure this makes sense? The act of throwing an exception writes to (thread local) memory. This seems like it would always be a side effect.

Memoization is a side-effect too, but it doesn't prevent the function from being pure.

No, it was agreed a while ago that memoization does not make a function pure; I had even proposed a patch to make some insn-attrtab functions pure. That's because you cannot detect when the memoization cache is cleared.


Paolo


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