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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,edb9cd4fb1b29f31,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!k17g2000pre.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: No_Implicit_Heap_Allocations Date: Thu, 27 Jan 2011 02:38:04 -0800 (PST) Organization: http://groups.google.com Message-ID: <0b92849a-7719-45f5-a6bb-568be824a414@k17g2000pre.googlegroups.com> NNTP-Posting-Host: 137.138.182.236 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1296124684 20795 127.0.0.1 (27 Jan 2011 10:38:04 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 27 Jan 2011 10:38:04 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k17g2000pre.googlegroups.com; posting-host=137.138.182.236; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:17702 Date: 2011-01-27T02:38:04-08:00 List-Id: 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