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,cf75272301f10c97 X-Google-Attributes: gid103376,public From: gauthier@alphainfo.unilim.fr (Michel Gauthier) Subject: Re: Ada.Exceptions could be 'pragma Preelaborate' ? Date: 1998/11/04 Message-ID: #1/1 X-Deja-AN: 408278767 References: Organization: Universite de Limoges Newsgroups: comp.lang.ada Date: 1998-11-04T00:00:00+00:00 List-Id: >> Stephen Leake wrote : >> >> > Currently, Ada.Exceptions has no elaboration pragma, and thus any unit >> > that 'withs' Ada.Exceptions cannot have 'pragma Preelaborate'. This is >> > a pain; I'm building a nice library, everything is either Pure or >> > Preelaborate, but then I start adding nice error messages to my >> > exceptions, and I have to get rid of the pragmas. I started replacing >> > Preelaborate with Elaborate_Body, and got some circular elaboration >> > problems. >> [...] >> > So, is there a reason Ada.Exceptions can't be Preelaborate? nothing in >> > the public spec violates a rule; do most implementations require >> > something that does? to which in article , Robert A Duff replied : >> Yes, I would expect implementations might want to do some >> non-preelaborable stuff in Ada.Exceptions. Couldn't designers envisage a Pure or Preelaborate Ada.Exceptions declaring at least Exception_Id and Raise_Exception, and a non-Preelaborate child ? It is really harmful to depend on a non-Preelaborate unit when the only need is to attach a message to a raise. It is more important than simply 'nice to have'. In some cases, I worked around the problem with a basic package containing raises with messages, with two bodies Pure (messages are ignored) versus Raise_Exception. Pragmas have to be set or reset by editor macros. ---------- ---------- ---------- ---------- Michel Gauthier / Laboratoire d'informatique 123 avenue Albert Thomas / F-87060 Limoges telephone + 33 5 55 43 69 73 fax +33 5 55 43 69 77 ---------- ---------- ---------- ---------- Hein, quoi, quelle annee dix-neuf cent nonante dix ? What exactly about year nineteen ninety ten ? ---------- ---------- ---------- ----------