This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: CONVERT_EXPR cleanup
Hi,
On Mon, 28 Sep 2009, Joseph S. Myers wrote:
> > So, would you be open to changing all CONVERT_EXPR in the C frontend to
> > NOP_EXPR (that is in convert.c, c-parser.c and c-typeck.c)? Most build1's
> > of the middle-end that create CONVERT_EXPRs look already bogus.
>
> I think the correct thing to be changing is places that can receive one or
> both of those codes, to treat them the same (with any consequent fixes
> needed), rather than arbitrarily changing places generating one code to
> generate the other.
Not generating the one in the first place (and consequentially fixing
that) would lead to exactly the same end-result. But yes, I can also
change all of the left explicit tests to CONVERT_EXPR_P/CASE_CONVERT if
that feels more assuring.
> (I'd prefer CONVERT_EXPR rather than NOP_EXPR to be the name that
> finally survives the unification.)
Yes, I just did it this way, because there are much more occurences of
NOP_EXPR than CONVERT_EXPR. It just was a ball park check, remember :)
Ciao,
Michael.