[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gm2] Re: data alignment is now possible
From: |
Gaius Mulley |
Subject: |
[Gm2] Re: data alignment is now possible |
Date: |
Sat, 19 Jun 2010 11:10:28 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) |
SiTex Graphics <address@hidden> writes:
> Thanks. That will be handy.
>
> I see now that my original question was poorly worded. What I was
> really after is a way to pack fields in a record as tightly as
> possible. Both XDS and StonyBrook have a global option for that.
> Here's a simple example (source code attached). With the following
> type declaration:
>
> Test = RECORD
> a : CARDINAL8;
> b : CARDINAL32;
> c : CARDINAL8;
> END;
>
> GM2 reports SIZE(Type) as 12, whereas StonyBrook and XDS report 6 with
> packed field alignment. With the other compilers changing the field
> alginment does not require modificiation of the source code, and that
> would be highly desirable. Maybe there's already a gcc-based
> command-line option for field alignment?
>
> In any case the ability to specify variable alignment will be useful
> in its own right.
>
> Thanks,
> Scott
Hi Scott,
Sure I see no problem adding the __attribute__((packed)) concept that
gcc uses into gm2. This also provides continuity with the gcc family.
Alas there is no command line option to specify field alignment -
quite a few to warn if (packed) makes no difference. I guess it is
safer to insist on minor code changes rather than remembering which
module was compiled with which option. A global ISO Modula-2 comment
directive might be another approach..
regards,
Gaius
- [Gm2] data alignment is now possible, Gaius Mulley, 2010/06/15
- Re: [Gm2] data alignment is now possible, Iztok Kobal, 2010/06/16
- [Gm2] Re: data alignment is now possible, SiTex Graphics, 2010/06/17
- [Gm2] Re: data alignment is now possible,
Gaius Mulley <=
- Re: [Gm2] Re: data alignment is now possible, Iztok Kobal, 2010/06/21
- Re: [Gm2] Re: data alignment is now possible, SiTex Graphics, 2010/06/22
- Re: [Gm2] Re: data alignment is now possible, Fischlin Andreas, 2010/06/23
- Re: [Gm2] Re: data alignment is now possible, Fischlin Andreas, 2010/06/23
- Re: [Gm2] Re: data alignment is now possible, Fischlin Andreas, 2010/06/23
- [Gm2] Re: data alignment is now possible, john o goyo, 2010/06/24
- Re: [Gm2] Re: data alignment is now possible, Fischlin Andreas, 2010/06/25