CVS difference for ais/ai-00131.txt
--- ais/ai-00131.txt 1998/10/01 00:24:24 1.2
+++ ais/ai-00131.txt 1998/10/01 03:20:15 1.3
@@ -1481,3 +1481,162 @@
****************************************************************
+From: Erhard Ploedereder[SMTP:ploedere@informatik.uni-stuttgart.de]
+Sent: Wednesday, May 06, 1998 7:07 PM
+Subject: Re: AI 131, revisited
+
+
+Based on all the words in the appendix, I don't think that this AI will
+fly (at least not with me) unless the semantics of the pragma are
+stated in detail. Questions like:
+ -- effect on Ada parameter passing of actuals of such type
+ -- applies to derived types ? subtypes ?
+ -- illegal for non-record types ?
+ -- applicable to tagged types ?
+ -- interactions with Convention C ?
+ usw. usw.
+
+Erhard
+
+****************************************************************
+
+From: Ted Baker
+Sent: Wednesday, May 06, 1998 5:52 PM
+Subject: Re: AI 131, revisited
+
+Erhard,
+
+Thanks for the feedback. I have no problem filling in details,
+though I'm surprised that you think they are needed, given:
+(1) the previously ARG-approved AI (with the pragma C_Pass_By_Copy)
+ had no more detail;
+(2) B.1 already specifies the general rules for convention pragmas,
+ and sets no precedent for further details;
+(3) we are supposed to be capturing what the vendors are currently
+ already doing, but the vendors have not cooperated in providing
+ me any more detailed semantics.
+
+Item (3) the biggie!! No sense in playing guessing games here,
+proposing detailed semantics and then being told by the vendors
+that they object because it will require them to change their
+implementations.
+
+The above being said, if you really insist on answering these
+questions, here are some ideas, for continuing the discussion:
+
+| Based on all the words in the appendix, I don't think that this AI will
+| fly (at least not with me) unless the semantics of the pragma are
+| stated in detail. Questions like:
+
+| -- effect on Ada parameter passing of actuals of such type
+
+I would limit the effect parameters of interfaced C subprograms,
+so parameters cannot be passed further to subprograms that do not
+have this convention.
+
+| -- applies to derived types ? subtypes ?
+
+I would limit the effect to parameters declared to be of the named
+subtype.
+
+| -- illegal for non-record types ?
+| -- applicable to tagged types ?
+
+I would not require support or define the effect except for
+non-tagged record types.
+
+Note that by B.1 (13-20) tagged types are not "eligible for
+convention" unless a particular implementation chooses to allow
+them. (BTW, I don't see any harm in allowing implementations to
+extend the applications of convention C_Pass_By_Copy, though I
+have no strong feeling on it.)
+
+| -- interactions with Convention C ?
+
+I would not define the effect if more than one convention is
+specified for a given subtype.
+
+| usw. usw.
+
+Wieso weiter? I just can't respond to such an open-ended ending.
+
+I'll wait until I see some more comments before offering a revised
+AI.
+
+--Ted
+
+****************************************************************
+
+From: Jean-Pierre Rosen[SMTP:rosen.adalog@wanadoo.fr]
+Sent: Thursday, May 07, 1998 1:47 AM
+To: arg95@ns1.sw-eng.falls-church.va.us
+Subject: Re: AI 131, revisited
+
+>| Based on all the words in the appendix, I don't think that this AI will
+>| fly (at least not with me) unless the semantics of the pragma are
+>| stated in detail. Questions like:
+>
+>| -- effect on Ada parameter passing of actuals of such type
+>
+>I would limit the effect parameters of interfaced C subprograms,
+>so parameters cannot be passed further to subprograms that do not
+>have this convention.
+>
+Well, it should at least also apply to exported Ada procedures...
+----------------------------------------------------------------------------
+ J-P. Rosen (Rosen.Adalog@wanadoo.fr)
+ Visit Adalog's web site at http://perso.wanadoo.fr/adalog
+
+****************************************************************
+
+From: Robert Dewar
+Sent: Thursday, May 07, 1998 6:00 AM
+Subject: Re: AI 131, revisited
+
+<<Well, it should at least also apply to exported Ada procedures...
+>>
+
+Only if they have Convention C!
+
+****************************************************************
+
+From: Ted Baker[SMTP:baker@dad.cs.fsu.edu]
+Sent: Thursday, May 07, 1998 7:25 AM
+Subject: Re: AI 131, revisited
+
+| >| -- effect on Ada parameter passing of actuals of such type
+| >
+| >I would limit the effect parameters of interfaced C subprograms,
+| >so parameters cannot be passed further to subprograms that do not
+| >have this convention.
+| >
+| Well, it should at least also apply to exported Ada procedures...
+
+This is an interesting philosophical question. What is the right
+default convention for parameters of an exported subprogram? When
+one imports a subprogram into Ada, one expects the parameters to
+be passed according to the convention of the foreign language.
+Should one not then, by symmetry, expect that if a subprogram is
+exported from Ada to a foreign language then the foreign language
+should expect the parameters to be passed according to the Ada
+conventions? I guess this is not a symmetric world, i.e., Ada
+compilers care about importing C functions but C compilers don't
+care about being able to import Ada subprograms.
+
+Given that things are not symmetric, it does make sense to allow
+the convention C_Pass_By_Copy to apply to parameters of Ada
+procedures exported to C as well as C procedures imported to Ada.
+
+--Ted
+
+****************************************************************
+
+From: Robert Dewar[SMTP:dewar@gnat.com]
+Sent: Thursday, May 07, 1998 7:47 AM
+Subject: Re: AI 131, revisited
+
+Of course! Absolutely it is the case that exported procedures with
+convention C are affected! This is the case in current implementations
+most certainly!
+
+****************************************************************
Questions? Ask the ACAA Technical Agent