CVS difference for ai12s/ai12-0002-1.txt

Differences between 1.3 and version 1.4
Log of other versions for file ai12s/ai12-0002-1.txt

--- ai12s/ai12-0002-1.txt	2012/06/07 06:28:37	1.3
+++ ai12s/ai12-0002-1.txt	2016/06/07 21:42:05	1.4
@@ -805,8 +805,62 @@
 of a remote call interface library unit.
 Standard boilerplate:
-In addition to the places where Legality Rules normally apply (see 12.3), this rule
-applies also in the private part of an instance of a generic unit.
+In addition to the places where Legality Rules normally apply (see 12.3), this
+rule applies also in the private part of an instance of a generic unit.
+From: Gary Dismukes
+Sent: Tuesday, June 7, 2016  1:00 PM
+There was an action item regarding this AI that was assigned to me at the June
+2015 meeting, to inquire with Thomas Quinot about what GNAT supports with
+respect to allowing user-defined stream attributes in RCI units and identify the
+extent of any customer dependence on that.
+As background, there is an AdaCore customer that has code that instantiates a
+generic Remote_Types package in an RCI unit, and GNAT was changed to allow that,
+but the customer was informed (back in 2012) that this usage might become
+illegal (due to eventual resolution of this AI).  The workaround would be to
+restructure their code by moving the instantiation into a Remote_Types package.
+It's conceivable that there are other customers that depend on this, though that
+seems somewhat unlikely.  My sense is that it appears reasonable to impose the
+restriction proposed by AI12-0002, and any customers depending on the current
+behavior will need to adapt their code.
+Thomas's assessment follows:
+* Thomas Quinot, 2016-06-06 :
+> I've just reviewed this, and here are my conclusions:
+> The customer does depend on this feature. Moving the offending types to
+> a remote types unit was suggested, but the customer specifically
+> mentioned that he needed a wavefront with a fix (that's on K307-028).
+> On the other hand, Bob's fix, while radical, is definitely safe, and
+> avoids the risk of adding additional ad hoc subtle rules, which Randy
+> has argued against on three counts:
+>   * the language should not break privacy (which as I answered
+>     previously is a pretty weak argument here, since the language
+>     already does break privacy anyway);
+>   * any of the solutions I proposed depend on GNAT's specific way
+>     of handling generics (inlining bodies);
+>   * legality should not depend on whether or not some type comes
+>     from a generic.
+> I do see some merit in his last two arguments, and it's not unfair to
+> say that the customer's code really should have a Remote_Types unit in
+> the first place, and ultimately it's true that there's a fundamental
+> flaw in having user defined stream attributes in an RCI unit (because
+> things in an RCI unit are meant to be called remotely, and stream
+> attributes are meant to be called locally).
+> So all in all I'm fine with Bob's proposal of entirely banning stream
+> attributes in RCI units, and we should let the customer know that
+> support for this will be removed from GNAT eventually, and that he'll
+> have to restructure his code. (I guess we have to display some level of
+> goodwill if we want to keep annex E in the standard at all).

Questions? Ask the ACAA Technical Agent