(j3.2006) (SC22WG5.3591) Assumed-type and Assumed-rank extensions for C Interop TR.

Aleksandar Donev donev1
Fri Jul 25 14:14:03 EDT 2008

On Friday 25 July 2008 11:05, Jim Xia wrote:

> This fragment doesn't demonstrate the "type casting" feature Bill is
> referring to. ?c_loc can be called on almost any types that is supported by
> C.
Correct. This can already be done with void* pointers that come from C through 
the TYPE(C_PTR) mechanism. Nothing new is being added---I believe this is 
just an example of how that can be used to do what C people would do with 
type casting a void* into another, more useful, pointer.

> This brings another area you have to address: data pointer assignment. ?The
> type compatibility requirements need to modified to "enable" the "type
> casting". ?If an object of TYPE(*) is type compatible with anything
This was not said in Bill's paper. I proposed to him that this be the case, 
but I believe it is not in the proposal. It says "In the association of 
actual and dummy arguments, a assumed-type dummy
argument is type and kind compatible with any actual argument." Note the 
qualifier at the beginning of the sentence. It does not mention type 
compatibility in general.

> the reverse is not true, then this assignment is illegal (similarly to the
> case that CLASS(*) target can not be pointer assigned to an integer
> pointer, for instance.) ?I can't find this in Bill's paper.
Yes, Bill needs to add some sentence about what TYPE(*) is type compatible 


More information about the J3 mailing list