This is the mail archive of the gcc-patches@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] for PR 18040


On Sun, 2004-10-17 at 16:29 -0400, Richard Kenner wrote:
>     It is the job of the optimizers to produce good code, not the job of
>     the front end.  If the optimizers can't produce good code from this,
>     then fix the optimizers.
> 
> Yeah, but there's no point in making things arbitrarily hard for them.
> GIGO still applies.
Except that this is exactly what you are doing by making it so
conversions can appear more or less anywhere in an expression, instead
of just a single place.

I see two sane options here.

1. Don't allow casts except at the top level. Deal with consequences.
2. Make them mandatory inside component_refs, so that you *always* have
them there.  This is what LLVM does with getelementptr. Each piece has a
type specifier


--Dan


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