[PATCH] improve C++ code by changing fold-const.c

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Sun May 23 14:38:00 GMT 2004


    There are places in the front ends, at least that assume that the tree
    structure is type correct, using explicit NOP_EXPRs to convert where
    necessary.  If the optimizers are confused by NOP_EXPRs, then they
    should be fixed -- that should generally be an easy fix.  (Note that a
    NOP_EXPR is a promise that the underlying bits do not change.)

So then how does it differ from VIEW_CONVERT_EXPR?  I somewhat take
back my previous message since you have given a more meaningful
semantic distinction between NOP_EXPR and CONVERT_EXPR, but we now
have *four* similar tree codes (NON_LVALUE_EXPR, NOP_EXPR,
CONVERT_EXPR, and VIEW_CONVERT_EXPR) and that sounds like too many.



More information about the Gcc mailing list