* Re: Limited_Controlled types and generic formal parameters [not found] <goliver.1.000B3230@magnus.acs.ohio-state.edu> @ 1995-01-20 14:17 ` Robert A Duff 1995-01-23 17:28 ` Cyrille Comar 0 siblings, 1 reply; 2+ messages in thread From: Robert A Duff @ 1995-01-20 14:17 UTC (permalink / raw) In article <goliver.1.000B3230@magnus.acs.ohio-state.edu>, Guy L. Oliver <goliver@magnus.acs.ohio-state.edu> wrote: >The problem seems to be that the generic package can not tell that item >(one of the generic formal parameters) is a derived type of limited >controlled. When I wrote a test program to see what was being initialized, I >saw that the item in the box was not being initialized. After consulting the >AARM, I am nearly certain that it should have. Sounds like a compiler bug. Every object of a controlled type gets Initialize called for it. That includes components (components are objects), and it even includes components whose type is a generic formal type that isn't visibly controlled. One exception: when you write an aggregate, this creates a temporary object, and Initialize is not called for that temp -- when you write an aggregate, you're asking for certain component values, and you don't want them modified. Usually, a controlled type will be a private type, or a private extension, so aggregates are only allowed within the package itself. - Bob ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Limited_Controlled types and generic formal parameters 1995-01-20 14:17 ` Limited_Controlled types and generic formal parameters Robert A Duff @ 1995-01-23 17:28 ` Cyrille Comar 0 siblings, 0 replies; 2+ messages in thread From: Cyrille Comar @ 1995-01-23 17:28 UTC (permalink / raw) bobduff@world.std.com (Robert A Duff) writes: : : Sounds like a compiler bug. Every object of a controlled type gets : Initialize called for it. That includes components (components are : objects), and it even includes components whose type is a generic formal : type that isn't visibly controlled. : It is more in the category of unimplemented (and clearly documented) features.... GNAT 2.00 was doing exactly 'nothing' with controlled components, let alone the wierd case of the original message... Just another reminder that GNAT is not (yet?) a validated Ada9x compiler so it is prudent to check the 'features' file before any experiment (or at least before drawing any conclusion from them) -- ------------------------------------------------------------------------ Cyrille Comar, E-mail: comar@cs.nyu.edu Gnat Project US phone: (212) 998-3489 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1995-01-23 17:28 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <goliver.1.000B3230@magnus.acs.ohio-state.edu> 1995-01-20 14:17 ` Limited_Controlled types and generic formal parameters Robert A Duff 1995-01-23 17:28 ` Cyrille Comar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox