From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: No_Implicit_Heap_Allocations
Date: Thu, 27 Jan 2011 02:38:04 -0800 (PST)
Date: 2011-01-27T02:38:04-08:00 [thread overview]
Message-ID: <0b92849a-7719-45f5-a6bb-568be824a414@k17g2000pre.googlegroups.com> (raw)
Consider this reduced test:
-- file p.ads:
package P is
procedure Wait_Until_Something;
end P;
-- file p.adb:
package body P is
protected Object is
entry Wait_Until_Something;
private
Something : Boolean := False;
end Object;
protected body Object is
entry Wait_Until_Something when Something is
begin
null;
end Wait_Until_Something;
end Object;
procedure Wait_Until_Something is
begin
Object.Wait_Until_Something;
end Wait_Until_Something;
end P;
-- file foo.adb:
pragma Restrictions (No_Implicit_Heap_Allocations);
with P;
procedure Foo is
begin
null;
end Foo;
Now the interesting part:
$ gnatmake foo
gcc -c p.adb
gnatbind -x foo.ali
error: "foo.adb" has restriction No_Implicit_Heap_Allocations
error: but the following files violate this restriction:
error: "p.adb"
gnatmake: *** bind failed.
$
What happens here? In what way p.adb violates the restriction on
implicit heap usage?
I don't see anything there that could possibly violate it and if it
does due to internals of this trivial protected object, then I think
Ravenscar programs are in trouble.
This is GNAT GPL 2009 on Linux-x86.
--
Maciej Sobczak * www.msobczak.com * www.inspirel.com
next reply other threads:[~2011-01-27 10:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 10:38 Maciej Sobczak [this message]
2011-01-27 11:00 ` No_Implicit_Heap_Allocations Maciej Sobczak
2011-01-27 11:06 ` No_Implicit_Heap_Allocations Mark Lorenzen
2011-01-27 15:49 ` No_Implicit_Heap_Allocations Maciej Sobczak
2011-01-27 18:07 ` No_Implicit_Heap_Allocations Vinzent Hoefler
2011-01-27 22:13 ` No_Implicit_Heap_Allocations Maciej Sobczak
2011-01-28 5:15 ` No_Implicit_Heap_Allocations Yannick Duchêne (Hibou57)
2011-01-28 15:19 ` No_Implicit_Heap_Allocations Maciej Sobczak
2011-01-28 15:38 ` No_Implicit_Heap_Allocations Mark Lorenzen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox