comp.lang.ada
 help / color / mirror / Atom feed
From: karl@grebyn.com (Karl A. Nyberg)
Subject: Generic problem in VAX-Ada 2.1
Date: 8 Jun 90 02:47:08 GMT	[thread overview]
Message-ID: <20120@grebyn.com> (raw)
In-Reply-To: 410@fbihh.UUCP

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 --

  reply	other threads:[~1990-06-08  2:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1990-06-07 17:02 Generic problem in VAX-Ada 2.1 Carsten Schroeder
1990-06-08  2:47 ` Karl A. Nyberg [this message]
1990-06-08 19:29   ` Robert I. Eachus
1990-06-11  7:02   ` Carsten Schroeder
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox