gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gm2] Re: Mapping types in the gcc+gm2 setup


From: Gaius Mulley
Subject: [Gm2] Re: Mapping types in the gcc+gm2 setup
Date: Tue, 01 Mar 2011 17:56:01 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

john o goyo <address@hidden> writes:

> Gaius:
>
> Where, in the gcc morass, are the Modula-2 types mapped to the C types?
>
> I ask because I wish to experiment with mapping CARDINAL to unsigned
> long long and see what happens.  (You may copy the gm2 list if you
> wish -- I did not wish to pollute the list with something this
> extraneous, unless I succeed #6-).
>
> Sincerely,
> jog

Hi John,

thanks - I'll push it to the list as this might come up again.

The main area it is mapped is:

   gm2/M2GCCDeclare.mod:DeclareDefaultSimpleTypes

where it maps the Modula-2 CARDINAL type with the GCC tree returned by:
gccgm2:GetM2CardinalType()

the file

   gm2/gccgm2.c

returns the GCC tree m2_cardinal_type_node which is built by the C
function build_m2_cardinal_node.  It is this function which you could
alter.  But a little warning, if any of the libc functions expect a
CARDINAL <-> unsigned int then the runtime will break.  However
unsigned int is seldom used in the runtime C api, so you may be lucky!

regards,
Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]