(j3.2006) (SC22WG5.3767) Response on the TR29113 draft N1761

Reinhold Bader Reinhold.Bader
Mon Dec 8 13:55:25 EST 2008

Aleksandar Donev schrieb:
> Hi,
> I am still processing Reinhold's proposals, but this I have thought 
> about already:
>> Issue 2 - polymorphism of assumed-type entity:
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> Since no changes to the definition of C_LOC() have been introduced,
>> and this function is used to cast an object of TYPE(*) to a usable
>> type, the text beginning in line 92 of N1761 should be replaced by
> I am not sure I understand. If the dummy is TYPE(*), and the actual is 
> polymorphic, then the assumed type of the dummy becomes the dynamic 
> type of the actual. It is no longer polymorphic once you are inside the 
> procedure. So what is the problem with doing C_LOC on it?

   Could one not apply the same argument to C_LOC() itself? Why was
   a polymorphic argument to C_LOC() disallowed?
   (Not that I'm against lifting that restriction :-))

>> "In the association of actual and dummy arguments, an assumed-type
>>  dummy argument is type and kind compatible with a non-polymorphic
>>  actual data argument of any type."
> I think there be some restriction that the type should be interoperable 
> if the procedure is BIND(C). But I am not sure it can be made to work. 
> It definitely requires more work.

   I don't think interoperability should be enforced here. It is not required
   for C_LOC() arguments either. One wants to be able to use handles.
> Best,
> Aleks
> _______________________________________________
> J3 mailing list
> J3 at j3-fortran.org
> http://j3-fortran.org/mailman/listinfo/j3


More information about the J3 mailing list