From: Florian Weimer <fw@deneb.enyo.de>
Subject: Re: Top 10 Language Constructs (Ada)
Date: 2000/07/25
Date: 2000-07-25T00:00:00+00:00 [thread overview]
Message-ID: <871z0i5ct0.fsf@deneb.enyo.de> (raw)
In-Reply-To: 8lk9hm$s21@newsserv.vs.dasa.de
"Dr. Joachim Schr�er" <joachim.schroeer@vs.dasa.de> writes:
> > for Plasma_Volts_Type'Small use Plasma_Volts_Type'Delta;
>
> At least with GNAT 3.12p this statement does not compile. The error message
> is:
>
> testfixpoint.adb:9:01: representation item appears too late
> testfixpoint.adb:9:01: warning: no more representation items for type
> "Plasma_Volts_Type" defined at line 7
The expression in the attribute definition clause is static
[3.5.10(2)], static expressions cause freezing [13.14(8)], as a
result, the corresponding type is frozen [13.14(10)]. [13.1(9)]
reads:
9. A representation item that directly specifies an aspect of a
subtype or type shall appear after the type is completely defined,
see 3.11.1, and before the subtype or type is frozen, see 13.14.
[...]
I don't know what "before" means in this context exactly, but I think
the GNAT behavior is correct, even though the expression which causes
freezing doesn't appear before the representation item, strictly
speaking.
next prev parent reply other threads:[~2000-07-25 0:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-14 0:00 Top 10 Language Constructs (Ada) Bruno Gustavs
2000-07-14 0:00 ` Andrew Hately
2000-07-14 0:00 ` David Kristola
2000-07-14 0:00 ` Samuel T. Harris
2000-07-15 0:00 ` Simon Wright
2000-07-18 0:00 ` Nick Keighley
2000-07-15 0:00 ` Marc A. Criley
2000-07-16 0:00 ` David Botton
2000-07-18 0:00 ` David Kristola
2000-07-18 0:00 ` Scott Ingram`
2000-07-18 0:00 ` Bill Brennan
2000-07-18 0:00 ` Dr. Joachim Schr�er
2000-07-19 0:00 ` Bill Brennan
2000-07-18 0:00 ` Scott Ingram`
2000-07-21 0:00 ` Keith Thompson
2000-07-25 0:00 ` Keith Thompson
2000-07-25 0:00 ` Dr. Joachim Schr�er
2000-07-25 0:00 ` Florian Weimer [this message]
2000-07-26 0:00 ` David Kristola
2000-07-19 0:00 ` David Kristola
2000-07-18 0:00 ` Stefan Skoglund
2000-07-24 0:00 ` Richard Riehle
2000-07-26 0:00 ` The Ada type model (was Re: Top 10 Language Constructs (Ada)) Marc A. Criley
2000-07-15 0:00 ` Top 10 Language Constructs (Ada) David Botton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox