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 PRs 27639 and 26719


> > It need not be.  Consider the following Ada example:
> > 
> > 	type x is new integer;
> > 	subtype y is x range 1..5;
> > 
> > The precision of x is 32, but y can be either 32 or 8: it's an
> > implementation choice.
> 
> And it's irrelevant as far as Ada language semantics are concerned.

I'm not sure what TYPE_PRECISION *means* in Ada semantic terms.
Clearly y'Size must be 3, but that's not the precision.

The only potential relevance to Ada semantics is if you then have an object
of type Y and you ask for it's 'Size: is that 8 or 32?  It's my
understanding that both are acceptable though I think most programmers
would expect 8.


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