This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to detect and handle functions with no sideeffects.
- To: hubicka at atrey dot karlin dot mff dot cuni dot cz
- Subject: Re: Patch to detect and handle functions with no sideeffects.
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Fri, 20 Aug 1999 23:11:30 -0700
- Cc: egcs-patches at egcs dot cygnus dot com
- Organization: CodeSourcery, LLC
- References: <19990821060424.35097@atrey.karlin.mff.cuni.cz>
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