This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make attribute functions pure
On Sun, 2004-07-25 at 23:59, Florian Weimer wrote:
> | Discussion: A declared-pure library_item has no variable
> | state. Hence, a call on one of its (nonnested) subprograms cannot
> | ``normally'' have side effects. The only possible side effects from
> | such a call would be through machine code insertions, unchecked
> | conversion to an access type declared within the subprogram, and
> | similar features. The compiler may omit a call to such a subprogram
> | even if such side effects exist, so the writer of such a subprogram
> | has to keep this in mind.
Interesting it doesn't mention the only interesting (read: portable) one
which is using the Import pragma. I quickly checked, and
calling an Imported subprogram doesn't mentionned as being
an external effect, I believe it should be. Did I miss
something?
Laurent