J3/03-133r2
Date: 2003 Apr 1
To: J3
From: Toon Moene
Subject: Cater for more C types
Reference: 02-007r3
One of the work items in N1510 calls for catering
for the C types int8_t, int16_t, int32_t, int64_t
and intptr_t. Discussion on the floor of 03-133r1
resulted in the request for addition of wchar_t.
According to the C Standard, wchar_t is an integer
type, so we make it interoperate with INTEGER, not
CHARACTER.
This paper attempts to do so.
This time, I copied and pasted from 02-307r1 and 02-319r2,
(well, actually, 307 since 319 says "see 307" :-)
thereby increasing the odds of getting it right.
EDITS:
[381:20] After "C_SIGNED_CHAR," insert "C_WCHAR_T,"; after "C_SIZE_T,"
insert "C_INT8_T, C_INT16_T, C_INT32_T, C_INT64_T,".
[381:22] Remove "and".
[381:22] After "C_INTMAX_T", insert ", and C_INTPTR_T".
[381:23] After "-1", insert "if the companion C processor
defines the corresponding C type and there is no
interoperating Fortran processor kind or -2 if the
C processor does not define the corresponding C type".
[385:17+] Add the following row to Table 15.2 below the row
for C_SIGNED_CHAR:
(Column 1) (Column 2) (Column 3)
INTEGER C_WCHAR_T wchar_t
[385:17+] Add the following rows to Table 15.2 below the row
for C_SIZE_T:
(Column 1) (Column 2) (Column 3)
INTEGER C_INT8_T int8_t
INTEGER C_INT16_T int16_t
INTEGER C_INT32_T int32_t
INTEGER C_INT64_T int64_t
[385:17+] Add the following row to Table 15.2 below the row
for C_INTMAX_T:
(Column 1) (Column 2) (Column 3)
INTEGER C_INTPTR_T intptr_t