(j3.2006) (SC22WG5.4663) AW: [ukfortran] Informal WG5 ballot on new draft DTS

Bader, Reinhold Reinhold.Bader
Mon Mar 19 09:39:51 EDT 2012


Malcolm Cohen wrote 

> 8.4, Note 8.11 [p29]
> Do we really have to say "C programmers should note"?
> In any case it is far too weakly worded (Reinhold's version does not really
> improve this), here is my suggestion:
> "A C function that modifies a C descriptor other than as permitted by this
> Technical Specification will cause undefined behaviour."
> BTW re Reinhold's version - pointer arithmetic beyond the limits of an object
> is already undefined behaviour in C, so I think we need not (and should not)
> say anything about that.

I was targetting the case of calculating a perfectly valid C address which happens to not be part of the described Fortran object e.g., in the case of a discontiguous array. Since the /base_addr/ is exposed, there is a quite good chance of this happening to the unsuspecting C programmer.

Regards
Reinhold




More information about the J3 mailing list