This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: trying to glue Modula-3 onto egcs table based exception handl ing support


    Do you provide C wrappers around opaque data structures with which you
    create C tree structures from Ada records?  Or do you have some sort
    of magic header processor?  Or do you keep things in sync by hand?

    I would suspect the first.  Which in my mind would at least at first
    be moderately painful to set up, but certainly the most resiliant
    long-term.

There's no way to do the former in Ada.

What happens is this: the ada tree structure is multi-level.  At the bottom
level nodes are defined as having numbered fields and numbered bits.  There
is a C and an Ada file that each make structures for the node at this level.
They are maintained manually, but all that has to change in them is to add
new bits and fields in the rare occaision when they run out.

The bulk of the tree datastructure is the mapping of named fields to those
sets of numbered fields and bits.  That correspondance, which changes every
few days, is maintaine in Ada sources written in a very stylized manner (with
a program to check that it maintains that style) and there's a program to
produce a C header from that file (actually, there are two: one for entities
and one for expressions).

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]