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]

Re: Patch to detect and handle functions with no sideeffects.



Neat stuff.

I suggest the attribute name "pure".  It is short, and evocative to
anyone who has done functional programming; functions that only read
memory, but do not write it, are side-effect free functions of their
inputs (which includes global memory).

The bottom line is that attribute names can only be hints; you're
going to need to read the GCC manual to know exactly what they do if
you're going to go sticking attributes on things yourself anyhow.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


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