(j3.2006) Question about 29113

Malcolm Cohen malcolm
Wed Oct 1 21:01:57 EDT 2014


If you check the paper that introduced these, this facility was (approximately) 
intended to allow general memory allocators written in C to allocate memory for 
Fortran entities.  Of course by the time we get to C_F_POINTER all we have is a 
base address so we want to prevent that base address being the address of 
something already in use.

And there are enormous numbers of Fortran entities whose addresses can be 
obtained by C.  Ordinary variables, expression results, procedures, etc. etc. 
etc.

p1 and p2 of the FPTR description cover the cases where we allow the base 
address to be that of a Fortran entity.

p3 covers the case where the base address is *NOT* that of a Fortran entity, 
i.e. the memory is
   "not in use by another Fortran entity"

No clairvoyance is needed, the sentence indeed means what it says, indeed you 
are not allowed to use "p3" to construct a pointer to ANY other Fortran entity 
whatsoever.  Far from nonsense it is precisely what we intended.

Cheers,

-----Original Message----- 
From: Van Snyder
Date: ?? 26?9?25? 4:01
To: j3
Subject: (j3.2006) Question about 29113

In the first edit in clause 9.9 in N1904 (DTS 29113), a paragraph is
added to the description of the FPTR argument of C_F_POINTER.  The final
sentence is:

        "The storage sequence shall be large enough to contain the
        target object described by FPTR, shall not be in use by another
        Fortran entity, and shall satisfy any other processor-dependent
        requirements for association."

What is the meaning of the middle part, viz. "shall not be in use by
another Fortran entity"?

Not the target of another pointer?  That's nonsense.

Not part of a pending I/O transfer?  That's nonsense.

What else?

This appears at [445:27-446:1] in 14-007r2.

Can we either delete this, or replace it with something that does not
require clairvoyance to understand it?


_______________________________________________
J3 mailing list
J3 at mailman.j3-fortran.org
http://mailman.j3-fortran.org/mailman/listinfo/j3

________________________________________________________________________
This e-mail has been scanned for all viruses by Star.
________________________________________________________________________

-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 




More information about the J3 mailing list