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,26c49fd1818f8774,start X-Google-Attributes: gid103376,public From: "Marc A. Criley" Subject: Ada compiler fixed point bug Date: 1996/06/18 Message-ID: <31C745BD.741E@philly.infi.net>#1/1 X-Deja-AN: 160890341 content-type: text/plain; charset=us-ascii organization: InfiNet mime-version: 1.0 reply-to: mcriley@bix.com newsgroups: comp.lang.ada x-mailer: Mozilla 2.02 (Win16; I) Date: 1996-06-18T00:00:00+00:00 List-Id: I recently located what I believe is a bug in a commercial Ada 83 compiler, but I want to first ensure there's no possible interpretation of the LRM that could provide a loophole :-) Here's a test program: procedure Delta_Test is Tiny_Delta : constant := 2.0**(-19); type Fxd is delta Tiny_Delta range -0.625..0.625; for Fxd'Size use 16; -- This should be too little. type R is record F : Fxd; end record; for R use record at mod 2; F at 0 range 0..15; -- And so should this. end record; X : R; begin null; end Delta_Test; The compiler in question happily compiles the above code with nary an error or warning, while two other compilers (three if you count GNAT in 83 mode) properly flag that the size of Fxd is too small (GNAT tells me 20 bits are needed, which is what I expected). This compiler does ostensibly have thorough support for all Chapter 13 constructs, so I would expect some sort of error or warning. Is there possibly some loophole that would result in this being a legal compilation? Thanks much! Marc A. Criley OOA = (Re)packaging, OOA /= Decomposition