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: [RFC] Tightening up the type system


Diego Novillo writes:
 > On Tue, 2004-09-28 at 13:05, Andrew Haley wrote:
 > > Diego Novillo writes:
 > >  > 
 > >  > 
 > >  > My question to the FE folks is: what are the right semantics for
 > >  > checking MODIFY_EXPR?  Is compatible_types_p too strict?  Should we have
 > >  > had a cast operation in the above assignment?
 > >  > 
 > >  > Not having the right types is increasingly getting in the way of the
 > >  > optimizers because we use compatible_types_p quite often to validate
 > >  > propagation opportunities.
 > > 
 > > It's an interesting view.  I'm pretty sure that we violate this is the
 > > Java FE in a few places, but perhaps we shouldn't.  The trouble is
 > > that the GENERIC type system has never been so well-defined.
 > > 
 > We use lang_hooks for adhering to the FE type system.  We don't really
 > have a GENERIC/GIMPLE type system.
 > 
 > Maybe we should if we lowered GIMPLE one more step, but for now we tie
 > the optimizers to the FE's type system.

Yeah, but surely the front end can generate trees that are not legal
in its own type system.  For example, Java doesn't have a (void*)
that's assignable to anything, but we generate trees of type (void*)
when lowering.

Andrew.


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