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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: access-to-classwide has non-static size? Date: Fri, 27 Mar 2015 08:53:09 +0000 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: mx02.eternal-september.org; posting-host="e362043f1eec5b72fb571caf32708303"; logging-data="21024"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19oyWlclNHEhTg8namwBPG0630NXtnoT0U=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin) Cancel-Lock: sha1:bCmymvYZDcQ9Kcd9ZOAZBF3lmjs= sha1:ZiAa2i3UQdgIkbrjOAKTNdCvIM4= Xref: news.eternal-september.org comp.lang.ada:25282 Date: 2015-03-27T08:53:09+00:00 List-Id: "J-P. Rosen" writes: > Le 27/03/2015 09:26, Simon Wright a écrit : >> protected type Dispatchable_Events is >> ... >> private >> ... >> The_Events : Event_Queues.Vector (Capacity => Capacity); >> >> and when compiling with the Ravenscar profile (GNAT GPL 2014, GCC 4.9.1, >> GCC 5.0.0 20150208) the compiler says >> >> warning: component has non-static size >> warning: creation of protected object of type "Dispatchable_Events" >> will violate restriction No_Implicit_Heap_Allocations >> >> Is this (the non-static size part!) right? > > It's not the component of the Vector (Event_P) which is non static, > it's the component of the PO (i.e. The_Events). Thanks, J-P. I need to do the allocation explicitly, then. I was hoping to be able to do it at elaboration.