------- Comment #2 from anlauf at gmx dot de  2008-01-16 22:41 -------
(In reply to comment #1)
> I don't think you can disable these types.  If your target does not support
> them, something is wrong.  

The target (if you refer to it as the underlying processor) does support
these types; at least they are supported in C but not in Fortran.

> How is char defined for your target?  sizeof(char) needs to be 1 to be
> complaint to C.

C is most likely fine, but I don't care too much about C.

Fortran on that platform (i.e. (sx)f90) does not support INTEGER(kind=1).
In fact, it does not need to.  If you look into the F2003 draft standard:

15.1.1 Named constants and derived types in the module

[...]
The values of C_SHORT, C_LONG, C_LONG_LONG, C_SIGNED_CHAR, C_SIZE_T,
C_INT8_T, C_INT16_T, C_INT32_T, C_INT64_T, C_INT_LEAST8_T, C_INT_LEAST16_T,
C_INT_LEAST32_T, C_INT_LEAST64_T, C_INT_FAST8_T, C_INT_FAST16_T,
C_INT_FAST32_T, C_INT_FAST64_T, C_INTMAX_T, and C_INTPTR_T shall each be
a valid value for an integer kind type parameter on the processor or shall
be -1 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.

I checked some of these parameters (using sxf90 -f2003 -dw -dW):

 C_SIGNED_CHAR  =  -1
 C_INT8_T       =  -1
 C_INT_LEAST8_T =  -2
 C_SHORT        =  2
 C_INT          =  4
 C_LONG         =  8
 C_LONG_LONG    =  8

I am a bit concerned about the value of C_INT_LEAST8_T, but the others
appear ok.

NEC's f90 is somewhat broken, although in other respect.
Printing selected_int_kind (i) for some values of i, I get:

  i  selected_int_kind (i)
  2            2
  4            2
  6            4
  8            4
 10            8
 12            8
 14            8
 16           -1
 18           -1

I am told that the last two lines are a known bug.

But by reading the standard I do not see a reason why there should
be a 1-byte integer type.  (Don't get me wrong: it would save me a
lot of trouble if NEC would support integer*1 ...)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34804

Reply via email to