[MPI3 Fortran] Proposing changes to Fortran 2008

Aleksandar Donev donev1 at llnl.gov
Thu Mar 20 11:50:33 CDT 2008


Craig Rasmussen wrote:
> struct foo {
>      char a;
>      char b;
>      int i;
>      char c;
>      char d;
> }
> 
> Don't you have to worry about the C compiler reordering the elements  
> of foo?
No, the C standard mandates that the order be preserved (with possible 
padding). I don't know the C99 standard well-enough to search it 
efficiently, but I am pretty sure it is so. Fortran does not guarantee 
anything unless it is an interoperable type.
Aleks



More information about the mpiwg-fortran mailing list