This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix type correctness of fold_indirect_ref
Andrew Pinski wrote:
This is where I am going to say, lets define a type system then because
right
now the middle-end does this which is wrong.
I agree, better typing rules would be nice.
Furthermore, the C++ front end probably shouldn't be doing this kind
of optimization anyhow; we really want it to be faithful to the source
representation to the extent reasonable. (See extensive previous
discussions on this point.) It may be that the C++ gimplifier should
be doing this, but not the front end proper.
I am going to say the C++ front-end should not using trees
That's orthogonal. There's no reason you can't write a great front end
using trees. The biggest negative -- and one of the reasons that both
Fortran and Ada do not do it that way -- is that using trees does tie
you to the rest of GCC.
I agree that you shouldn't be "generating code" during parsing and
semantic analysis, but that's not the same as saying that using trees is
a bad thing.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304