[M3devel] m3gap.... it's an alignment issue

Dragiša Durić dragisha at m3w.org
Fri Oct 8 20:46:56 CEST 2010


We will always have some friction there... IMO, stricter is better, with
maybe a pragma there... preceding variable/field name, fixing align,
like

  EventKey = RECORD
    type: EventType;
    <* ALIGN 4 *> window: WindowStar;
    ...
  END;

As for GCC... Does it not make alignment exception, or something, to
reference non-aligned pointer on AMD64?

Idealized structs... I didn't follow you there, probably I missed
something earlier on list.

On Fri, 2010-10-08 at 18:36 +0000, Jay K wrote:
> I may have broken this, a while ago. I may have relaxed all the
> alignments long ago.
> We have very little interfacing with C now and most of that is with
> our own C,
> where I avoid small types.
> We have had at least temporary problems related to our rules being
> sort of too strict.
>   The need for -munaligned-double or such. (which reminds me I should
> try that again).
>   Where our rules were ok but gcc's default for to align stuff more.
>   Where our layout and gcc's didn't agree.
> 
> How bad would it be to generate or write a C layer that copies stuff
> into "idealized" structs?
>   Where the types are all INTEGER or LONGINT or pointers. 
-- 
Dragiša Durić <dragisha at m3w.org>




More information about the M3devel mailing list