From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,52882f38318f3520 X-Google-Attributes: gid103376,public From: jjjensen@cybernet.dk (Jens Jakob Jensen) Subject: Re: Linking an ADA routine to a program written in C Date: 1996/09/26 Message-ID: #1/1 X-Deja-AN: 185370368 distribution: world references: <51p2vu$enf@lal.interserv.com> content-type: text/plain; charset=ISO-8859-1 organization: Ozwix Data mime-version: 1.0 newsgroups: comp.lang.ada Date: 1996-09-26T00:00:00+00:00 List-Id: In article , comar@dantes.enst.fr (Cyrille Comar) wrote: [snip] >(Ada 95). Interfacing with most other >languages is not implementation-defined anymore. This is perfectly >well defined in the R.M. See description of pragma Import/Export and >definition of standard procedures adainit (for elaboration of the Ada >part when main is not in Ada) and adafinal (for finalization of the >same Ada part). All of this is completely standard and implemented as >required at least in GNAT but most probably in other Ada95 compilers >as well. > >Cyrille I haven't followed this thread, so I'm sorry if it's off-topic. But I have long been wondering what the consensus is wrt. finalization and things like signals, OS-exceptions, C abort() &c. Should the Runtime go out of its way to finalize things, or should the programmer write signal handlers, OS-exception handlers, and override abort() &c ? Since I am using GNAT under OS/2, where finalization isn't done when a signal is raised (eg. Ctrl-C/SIG_BREAK) I would be interested in what consensus is and what other compilers do. Is it at all possible to _ensure_ that finalization gets done when interfacing with C ? (when not counting power/hardware failures) Thanks in advance for any info... ----------------------------------------------------------------------------- -- jjjensen@cybernet.dk (current) -- -- Jens_Jakob_Jensen@mailhost.net (permanent, thanks to www.pobox.org.sg) -- -----------------------------------------------------------------------------