This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Removing useless/redundant "const" calls
- From: Michael Matz <matz at suse dot de>
- To: Fergus Henderson <fjh at cs dot mu dot oz dot au>
- Cc: Geert Bosch <bosch at gnat dot com>,Zack Weinberg <zack at codesourcery dot com>, <law at redhat dot com>,<gcc-patches at gcc dot gnu dot org>
- Date: Thu, 12 Jun 2003 20:34:42 +0200 (CEST)
- Subject: Re: [tree-ssa] Removing useless/redundant "const" calls
Hi,
On Fri, 13 Jun 2003, Fergus Henderson wrote:
> There's no conflict, so long as the *programmer* declares that these
> functions are pure. In such cases, the explicit declaration gives the
> compiler permission to make optimizations which it would not otherwise
> be allowed to do.
>
> If however we are talking about having the compiler *infer* when
> functions are pure, then the compiler must be more conservative, if it
> is to conform to the C standard.
I completely agree.
Ciao,
Michael.