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: border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: access-to-classwide has non-static size? Date: Fri, 27 Mar 2015 08:26:17 +0000 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="e362043f1eec5b72fb571caf32708303"; logging-data="15912"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QF04DqJjafp9Ae2+iZ5lXSOgOz7mqQQ0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (darwin) Cancel-Lock: sha1:7T+SvaPN9ZtJRY8RiIPYWT4iq0k= sha1:LOqe2vFoEeqM6Ezq+xQPkw6i7pY= Xref: number.nntp.giganews.com comp.lang.ada:192584 Date: 2015-03-27T08:26:17+00:00 List-Id: I'm creating a PO which has a member which is a bounded vector of pointer-to-classwide, type Event_Base is abstract tagged limited private; type Event_P is access all Event_Base'Class; ... package Event_Queues is new Ada.Containers.Bounded_Vectors (Index_Type => Positive, Element_Type => Event_P); ... 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? I tried declaring Event_P "with Size => 64"; no difference. I think, studying the output of -gnatR, a pointer-to-classwide is a thin pointer, i.e. 4 bytes on arm-eabi).