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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!decwrl!decuac!grebyn!karl From: karl@grebyn.com (Karl A. Nyberg) Newsgroups: comp.lang.ada Subject: Generic problem in VAX-Ada 2.1 Message-ID: <20120@grebyn.com> Date: 8 Jun 90 02:47:08 GMT References: <410@fbihh.UUCP> Sender: karl@grebyn.com Organization: Grebyn Corp. Distribution: List-Id: In article <410@fbihh.UUCP> schroed@fbihh.UUCP (Carsten Schroeder) writes: > 6 PACKAGE my_image_io IS NEW image_io (pixel_type, > 7 image_type, >.................................................1 >%ADAC-E-GENACTNOTCONSTR, > (1) Type image_type in tools at line 4 is not constrained > [LRM 12.3.2(4), 13.7a.1, 13.10.2(2+)] >%ADAC-I-GENACTNOCONST2, > (1) Corresponding formal type image_type in image_io at line 3 is used within > generic package image_io in image_io at line 1 as an actual corresponding > to formal type TARGET in predefined UNCHECKED_CONVERSION >%ADAC-I-GENACTNOCONST1U, > (1) Generic formal type TARGET in predefined UNCHECKED_CONVERSION does not > allow an unconstrained actual array type or an unconstrained actual type > with discriminants (with or without defaults) > >I suspect that this new behaviour results from a misinterpretation of >section 12.3.2(4) of the Ada Language Reference Manual by the implementors at >DEC. I myself do not fully understand this section ether (actually, I'm not a >lawyer) and I would be interested if anybody else does. This set of files compiles fine under VADS 6.0.1(a) for VAX/Ultrix. I'm not a language lawyer either (where's Bob Eachus when you need him - probably on his way to Dublin... :-)) Maybe what is missing is AI-00037/12-BI-WJ (a binding AI, approved all the way through ISO to the Director of the AJPO), which reads in part: For occurrences of the name of a formal private type at places where this name is used as an unconstrained subtype indication, the actual subtype can be an unconstrained type with discriminants that have defaults even if an occurrence of the formal type is at a place where either a constraint or default discriminants would be required for a type with discriminants. The same applies to occurrences of the name of a subtype of the formal type, and to occurrences of the name of any type or subtype derived, directly or indirectly, from the formal type. -- Karl --