C++ PATCH: PR3989
Gabriel Dos Reis
gdr@codesourcery.com
Mon Aug 13 14:19:00 GMT 2001
Mark Mitchell <mark@codesourcery.com> writes:
| This patch fixes PR3989, a regression relative to GCC 3.0 in
| GCC 3.0.1.
Thanks!
[...]
| val = build (COMPOUND_EXPR, DECL_CONTEXT (fn), arg, to);
| + /* Even though the assignment may not actually result in any
| + code being generated, we do not want to warn about the
| + assignment having no effect. That would be confusing to
| + users who may be performing the assignment as part of a
| + generic algorithm, for example.
| +
| + Ideally, the notions of having side-effects and of being
| + useless would be orthogonal. */
| + TREE_SIDE_EFFECTS (val) = 1;
I'm not acquainted with all the implications of TREE_SIDE_EFFECTS,
but can the above have a possible impact on (current) optimizations?
I'm asking in order to fill my ignorance.
-- Gaby
CodeSourcery, LLC http://www.codesourcery.com
More information about the Gcc-patches
mailing list