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,45a9122ddf5fcf5 X-Google-Attributes: gid103376,public From: "W. Wesley Groleau (Wes)" Subject: Re: Rules for Representation of Subtypes Date: 1996/10/10 Message-ID: <9610101740.AA09737@most>#1/1 X-Deja-AN: 188590048 sender: Ada programming language comments: Gated by NETNEWS@AUVM.AMERICAN.EDU mailer: Elm [revision: 70.85] newsgroups: comp.lang.ada Date: 1996-10-10T00:00:00+00:00 List-Id: The opinion was expressed that the generic formals for unchecked_conversion have to be the same size or at least source smaller than target. I choose not to comment on the truth or falsehood of that opinion, but I offer the behavior of three vendors (Ada-83 except gnat): Apex on SPARC: If source is larger than target, the warning message in the semantic phase is that they are not the same size. However, you do not see the warnings unless there are also errors to justify opening the message window. Alsys on HP RISC: NO diagnostic at all if default compiler settings are used. In the one case I tested, the code also seemed to work, i.e. the lost information just happened to not be needed. Since I did not decide whether to use the default settings, I haven't bothered to try others. GNAT: Code rejected when source and target were not the same size. I've forgotten which was larger. I haven't used Verdix in 18 months, but if I remember right, it allowed source to be larger than target WITH a warning. Similar memory for VAX Ada, though I haven't used that in five years. Unfortunately, many coders suppress warnings because "there are so @$#^$%^*&$ many of them, they just hide the real problems." --------------------------------------------------------------------------- W. Wesley Groleau (Wes) Office: 219-429-4923 Hughes Defense Communications (MS 10-40) Home: 219-471-7206 Fort Wayne, IN 46808 (Unix): wwgrol@pseserv3.fw.hac.com ---------------------------------------------------------------------------