(j3.2006) CFI_index_t
Robert Corbett
robert.corbett
Fri Feb 10 03:14:58 EST 2012
The definition given for CFI_index_t in Clause 8.3.2 of the draft Further C
Interoperability TS is not clear. The definition is
CFI_index_t is a typedef name for a standard signed integer type
capable of representing the result of subtracting two pointers.
I assume the definition does not mean the result of subtracting two arbitrary
pointers. I assume that the definition assumes something like the definition of
pointer subtraction provided in the C standard, but extended to handle cases not
defined by the C standard. One important issue is whether the definition is
based on pointers to elements of C arrays or pointers to elements of Fortran
arrays. For some Fortran processors and C companion processors, that difference
will make a difference in the required size of the integer type. Here is my
best guess at the intended meaning of the definition:
CFI_index_t is a typedef name for a standard signed integer type
capable of representing the integers from -N to N, where N is the
largest number of elements the Fortran processor supports for an
array whose elements are not zero-sized.
I can easily imagine that I have not correctly guessed the intended meaning. If
that is the case, please let me know how my proposed definition differs from the
intended meaning.
Robert Corbett
More information about the J3
mailing list