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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,976a050e0f89277c X-Google-Attributes: gid103376,public From: kilgallen@eisner.decus.org (Larry Kilgallen) Subject: Re: Urgent question: malloc and ada...READ/NEW/FOLLOWUP Date: 1998/04/10 Message-ID: <1998Apr10.073110.1@eisner>#1/1 X-Deja-AN: 342721334 X-Nntp-Posting-Host: eisner.decus.org References: <352A79C2.15FB7483@nathan.gmd.de> X-Trace: news.decus.org 892207882 5899 KILGALLEN [192.67.173.2] Organization: LJK Software Reply-To: Kilgallen@eisner.decus.org.nospam Newsgroups: comp.lang.ada Date: 1998-04-10T00:00:00+00:00 List-Id: In article , gwinn@ma.ultranet.com (Joe Gwinn) writes: > detail. It sounds like you are calling Ada from C; this is difficult to > impossible with Ada83, and better with Ada95, but is often tricky. Ada83 > really expected to be on top, to be the main(), and it was often easier to > call C from an Ada main than to call Ada from a C main. Those limitations regarding which language was used for the main program may be true for some particular Ada83 implementation with which you are familiar, but they are not a characteristic of the Ada83 language itself. One problem I have heard discussed here is "elaboration", and DEC Ada for VMS has always done that via the LIB$INITIALIZE mechanism of the operating system, without requiring the main program be written in Ada. (There was a bug 10 years ago when sharable images (DLLs) were used, but bugs are bugs.) Since LIB$INITIALIZE is an "obvious" capability of the operating system, presumably GNAT for VMS either does the same obvious thing with LIB$INITIALIZE or does something different which also works, but at any rate does not ignore the issue. > C may well not be setting the stack and registers up to Ada's liking. Or > vica versa. This also should be a non-problem if the operating system (like VMS) mandates a calling standard. On less organized operating systems you may survive by buying all your compilers from the same source. Perhaps the main advantage of Ada95 is that it forces compiler developers to do the right thing, rather than trusting them :-). Larry Kilgallen