Re: Warning: The structure contains misaligned fields
- From: glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
- Date: Mon, 28 Apr 2008 12:55:50 -0800
Steve Lionel wrote:
On Mon, 28 Apr 2008 11:06:45 -0800, glen herrmannsfeldt <gah@xxxxxxxxxxxxxxxx>
wrote:
I thought that padding was allowed, though. COMMON in Fortran 66
was usually believed not to allow padding, creating alignment
problems fairly often. C struct definitely allows padding, which
is good because many current processors don't allow misaligned
access. (IA32 does, but it is often much slower.)
Doesn't COMMON now allow for padding?
Only to the length of a "storage unit" if you still want to meet
the letter of the standard.
So anything smaller can be padded, but no padding for items
larger than a "storage unit."
So the old rule of double precision variables first should
still work.
-- glen
.
- References:
- Warning: The structure contains misaligned fields
- From: blitheli
- Re: Warning: The structure contains misaligned fields
- From: Gordon Sande
- Re: Warning: The structure contains misaligned fields
- From: blitheli
- Re: Warning: The structure contains misaligned fields
- From: Craig Powers
- Re: Warning: The structure contains misaligned fields
- From: jamesgiles@xxxxxxx
- Re: Warning: The structure contains misaligned fields
- From: glen herrmannsfeldt
- Re: Warning: The structure contains misaligned fields
- From: Steve Lionel
- Warning: The structure contains misaligned fields
- Prev by Date: Re: Bug in gfortran when reading end of file?
- Next by Date: Re: Warning: The structure contains misaligned fields
- Previous by thread: Re: Warning: The structure contains misaligned fields
- Next by thread: Re: Warning: The structure contains misaligned fields
- Index(es):
Relevant Pages
|
|