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]: CALL_EXPR should set TREE_SIDE_EFFECTS


On Fri, 22 Aug 2003 09:37:45 +0100, Nathan Sidwell <nathan@codesourcery.com> wrote:

> In tracking down the regressions I'v caused in C++ wrt no-effect
> expressions, I discovered that building a CALL_EXPR does not automatically
> set TREE_SIDE_EFFECTS. Both C & C++ frontends set it explicitly immediately
> afterwards (but C++ forgets a few places).

On the tree-ssa branch we've adopted the convention that a call to a const
function does not have TREE_SIDE_EFFECTS set.  This could stay limited to
the optimizers, but it seems reasonable to warn about ignoring the return
value of a call to a const function.

Jason


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