From: johnjohn@cox.net
Subject: Code Statement
Date: Tue, 18 May 2010 13:12:53 +0000 (UTC)
Date: 2010-05-18T13:12:53+00:00 [thread overview]
Message-ID: <hsu3ok$gag$1@speranza.aioe.org> (raw)
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;
next reply other threads:[~2010-05-18 13:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-18 13:12 johnjohn [this message]
2010-05-18 13:22 ` Code Statement Ludovic Brenta
2010-05-18 13:29 ` AdaMagica
2010-05-18 15:05 ` sjw
2010-05-19 4:37 ` anon
2010-05-19 6:07 ` Simon Wright
2010-05-19 9:56 ` sjw
2010-05-19 10:20 ` AdaMagica
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox