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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47327673b9e29af0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-18 18:44:49 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!world!news From: Robert A Duff Subject: Re: exceptions and C functions (was Re: Ada -> C or C++ translator) Sender: news@world.std.com (Mr Usenet Himself) Message-ID: Date: Wed, 19 Jun 2002 01:44:11 GMT References: <3D0DD57A.5000402@yahoo.com> NNTP-Posting-Host: shell01.theworld.com Organization: The World Public Access UNIX, Brookline, MA X-Newsreader: Gnus v5.7/Emacs 20.7 Xref: archiver1.google.com comp.lang.ada:26336 Date: 2002-06-19T01:44:11+00:00 List-Id: Dale Stanbrough writes: > Robert A Duff wrote: > > > It supports the full language, including exceptions, tasking, etc (but > > not the optional annexes). (It's not *easy* to translate Ada's > > exceptions into C, but it is possible.) > > Can Ada exceptions cross C functions? E.g. if an Ada subprogram called > a C function, which called an Ada subprogram which raised an exception, > would the exception propagate across the C void? Yes. > If they don't (and pragma import of external language elements is > basically incompatable with exceptions) then couldn't you just > translate all Ada subprograms into equivalent C functions but with > an extra exception paarameter? Yes, but that wouldn't be very efficient. Also, part of the goal (not the *main* goal) is to make the C code somewhat human-readable, so we don't want to clutter things with extra implicitly-generated parameters except in cases where we have to. - Bob