This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] for PRs 27639 and 26719
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: duncan dot sands at math dot u-psud dot fr
- Cc: ebotcazou at adacore dot com, gcc-patches at gcc dot gnu dot org, iant at google dot com, rakdver at atrey dot karlin dot mff dot cuni dot cz, rguenther at suse dot de, sebastian dot pop at cri dot ensmp dot fr
- Date: Thu, 06 Jul 2006 12:07:35 EDT
- Subject: Re: [patch] for PRs 27639 and 26719
- References: <20060520192624.GA28713@atrey.karlin.mff.cuni.cz> <20060706135038.GA25659@atrey.karlin.mff.cuni.cz> <10607061426.AA23675@vlsi1.ultra.nyu.edu> <200607061740.12289.duncan.sands@math.u-psud.fr>
> > 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.