This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] improve C++ code by changing fold-const.c
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Sun, 23 May 04 10:35:41 EDT
- Subject: 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.