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


Jason Merrill wrote:
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.
yeah, that seems reasonable too - and was my first thought about why it
wasn't being set in make_node. I can patch build to DTRT if you like

nathan


-- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC The voices in my head said this was stupid too nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk



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