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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,8b6340ddbfdcd2d,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!feeder.erje.net!news.k-dsl.de!aioe.org!not-for-mail From: johnjohn@cox.net Newsgroups: comp.lang.ada Subject: Code Statement Date: Tue, 18 May 2010 13:12:53 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: Reply-To: johnjohn@cox.net NNTP-Posting-Host: iiqD5HETree3JSu3Mp38yA.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Xref: g2news2.google.com comp.lang.ada:11727 Date: 2010-05-18T13:12:53+00:00 List-Id: Trying to use the "Code Statement" for a special project, by passing the ASM proc/func. So, can Gnat process a true "Code Statement" statement? When I compile the following example using >gnat make temp.adb -gnatpg gcc -c -gnatpg temp.adb temp.adb:10:07: incorrect type for code statement gnatmake: "temp.adb" compilation error Source code: package Machine_Code is type Asm_Insn is new Integer; -- type required by gant x86_NOP : constant Asm_Insn := 16#90#; type M_Code_0 is record Opcode : Asm_Insn; end record; pragma Pack (M_Code_0); end Machine_Code; Source code: with Machine_Code; procedure temp is procedure Test; procedure Test is use Machine_Code; begin M_Code_0'(Opcode => x86_NOP); -- line 10 end Test; begin null; end temp;