[Patch, Fortran, F08] PR 44649: STORAGE_SIZE intrinsic

Tobias Burnus burnus@net-b.de
Thu Jul 8 14:51:00 GMT 2010


On 07/08/2010 03:53 PM, Janus Weil wrote:
> However, the argument of C_SIZEOF is not optional. So the check for
> EXPR_NULL should not be necessary, right?
>   

True, though I was more thinking of something along the line
  type(c_ptr) :: cptr
  integer(c_intptr) :: iptr
  write(*,*) 'pointer size:', c_sizeof(cptr), c_sizeof(iptr),
c_sizeof(C_NULL_PTR)

Actually, it seems even without thinking about optional arguments that
should be valid - C_NULL_PTR is interoperable. I do not know how it
shows up in check.c - probably as EXPR_VARIABLE and thus it should work
with the patch you proposed.

By the way, when you update intrinsic.texi, can you also add
C_NULL_(FUN)PTR to
http://gcc.gnu.org/onlinedocs/gfortran/ISO_005fC_005fBINDING.html ?


Tobias



More information about the Gcc-patches mailing list