This is the mail archive of the 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] Improve PR30911 and PR31023, Ada and VRP

On Mon, 31 Mar 2008, Richard Kenner wrote:

> > Now what I ask the Ada guys for:  please define the semantics
> > of sub-types for the middle-end.  Stick to _one_ semantics, independent
> > of whatever mode the Ada frontend is in, and adjust the Ada frontend
> > to emit code that is safe under these semantics.
> > 
> > Is this too much asked?
> No, but we don't have a mechanism for it now because "valid" is an attribute
> of a *variable*, while bounds are attributes of types.  I'd suggest we add
> a "invalid" bit to a VAR_DECL and then it can be set by the front end and
> propagated as necessary into expressions.

Please not.  If they are an attribute of a variable you could stick
the information in its type as well.  You just have to be careful what
variables to give the type.  Basically
"Ada integral sub-type semantics" != "middle-end sub-type semantics".
I don't see how we can ever reach a == here.

But you seem to agree that sub-types are "useless" for the middle-end
as they are now?


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