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,d57302f2954365e1 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Question about base types Date: 1997/02/10 Message-ID: #1/1 X-Deja-AN: 217776827 references: <32FB45D4.2160@watson.ibm.com> organization: New York University newsgroups: comp.lang.ada Date: 1997-02-10T00:00:00+00:00 List-Id: Norman suggested: <> Robert replies At least some cases of this kind are caught: 1. with Ada.Finalization; use Ada.Finalization; 2. package a is 3. type m is new controlled with null record; 4. procedure Initialize (Object : in out m); 5. end a; 1. package body a is 2. procedure Initialize (Object : in out m) is 3. x : m; | >>> warning: infinite recursion >>> warning: Storage_Error will be raised at runtime 4. begin 5. null; 6. end; 7. end a; The diagnostic here is a little mysterious, but I would hesitate to special case it unless someone really has run into this in practice. Generally we like to apply the reality check of someone actually (a) running into an error that could be caught and (b) being mystified enough to waste time looking for the error. I always hesitate to add new diagnostics that come only from thought experiments. Note that we are happy to get suggestions for error checks and improved diagnostics. The best form for such suggestions is to send a complete source program to report@gnat.com with a suggestion of exactly what error message you would like to see. Now sometimes, such suggestions amount to asking the compiler to read your mind, and it is impossible to implement them, but it is remarkable how often we *have* been able to sort things out, even in cases which at first look very hard. Robert Dewar Ada Core Technologies