(j3.2006) Do C_PTR and C_FUNPTR have pointer components

Aleksandar Donev donev1
Mon Jan 15 23:34:09 EST 2007


Hi,

In the UTI's in 07-007 Malcolm says that saying that IMAGE_TEAM is a 
derived type with pointer components does not actually force the 
implementation to have such components...it merely helps to write the 
standard more easily and with less repetition and special-casing.

I think we should say such a thing for types C_PTR and C_FUNPTR. They 
really do act like they have a pointer component. This would eliminate 
the need to special case them. For example, the issues raised by UTI 192 
would go away---it would be covered under the pointer component clauses. 
Similarly for the new restrictions on cross-image use of pointers---we 
presently have to always add analogous restrictions for the C pointers.

I have always been unhappy that C interop did not tie into the usual 
Fortran pointers, and rather invented yet another, opaque, way of having 
pointers. And I am seeing that this is indeed causing the problems I 
envisioned...with C pointers always needing extra integration whenever 
we change something about Fortran pointers.

Are there reasons against saying C_PTR has pointer direct components?

Thanks,
Aleks

-- 
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ LLNL
High Performance Computational Materials Science and Chemistry
E-mail: donev1 at llnl.gov
Phone: (925) 424-6816  Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev



More information about the J3 mailing list