From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,5f764f1f7822ab9c X-Google-Attributes: gid103376,public From: Florian Weimer Subject: Re: Top 10 Language Constructs (Ada) Date: 2000/07/25 Message-ID: <871z0i5ct0.fsf@deneb.enyo.de>#1/1 X-Deja-AN: 650620180 Content-Transfer-Encoding: 8bit References: <8kmjja$l5h$1@pollux.ip-plus.net> <3970F56F.F3A70FAD@icdc.com> <01HW.B59982450058903A078EC70C@news.pacbell.net> <39751555.4E40A4A7@lmco.com> <8l21od$mkr@newsserv.vs.dasa.de> <8lk9hm$s21@newsserv.vs.dasa.de> Organization: Enyo's not your organization Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-07-25T00:00:00+00:00 List-Id: "Dr. Joachim Schr�er" 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.