This is the mail archive of the gcc@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] improve C++ code by changing fold-const.c


    > Oh by the way I notice that C++ front-end uses CONVERT_EXPR instead of 
    > NOP_EXPR
    > when converting between pointer and reference types anyways which is 
    > wrong as
    > CONVERT_EXPR is defined as creating code which this conversion does 
    > not.  There
    > are most likely more like this. 

    Yes, that certainly sounds like a bug.

I would take the opposite view and ask why we have both NOP_EXPR and
CONVERT_EXPR.  Why is a front end supposed to be in the business of
guessing whether or not code will be generated for a conversion?  And
who cares one way or the other?  How can we state the semantic difference
between these two nodes in a useful manner?

My choice would be to eliminate NOP_EXPR.


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