[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gm2] translating C bit fields
From: |
Gaius Mulley |
Subject: |
Re: [Gm2] translating C bit fields |
Date: |
Sat, 19 Nov 2011 15:58:28 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
SiTex Graphics <address@hidden> writes:
> I'm looking for advice on how to translate bit fields in a C struct
> for reference in MODULA-2 (compiling with gm2).
>
> E.g.,
>
> struct _GtkToggleButton
> {
> GtkButton button;
>
> guint active : 1;
> guint draw_indicator : 1;
> guint inconsistent : 1;
> };
>
> My first thought is to turn the bit fields into a set, but I'm
> wondering whether that will reliably match up with the way bits are
> packed by gcc.
>
Hi Scott,
yes I think initially a set might be the best interim solution. gm2
will be modified to include bit accessible fields and also implement
the gnu __attribute__ ((packed)). Both are just a case of passing the
details through to the gcc middle end trees,
regards,
Gaius
- [Gm2] translating C bit fields, SiTex Graphics, 2011/11/16
- Re: [Gm2] translating C bit fields,
Gaius Mulley <=
- Re: [Gm2] translating C bit fields, SiTex Graphics, 2011/11/21
- Re: [Gm2] translating C bit fields, Gaius Mulley, 2011/11/23
- Re: [Gm2] translating C bit fields, Dragiša Durić, 2011/11/23
- Re: [Gm2] translating C bit fields, Gaius Mulley, 2011/11/23
- Re: [Gm2] translating C bit fields, Dragiša Durić, 2011/11/23
- Re: [Gm2] translating C bit fields, SiTex Graphics, 2011/11/23
- Re: [Gm2] translating C bit fields, Dragiša Durić, 2011/11/23
- Re: [Gm2] translating C bit fields, Fischlin Andreas, 2011/11/24
- Re: [Gm2] translating C bit fields, Gaius Mulley, 2011/11/23