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-Thread: a07f3367d7,a568c3c1e0be03bf,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.143.145 with SMTP id v17mr457140bku.7.1339700812739; Thu, 14 Jun 2012 12:06:52 -0700 (PDT) Path: e27ni48343bkw.0!nntp.google.com!news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Streams and abnormality Date: Tue, 12 Jun 2012 10:31:17 +0100 Organization: A noiseless patient Spider Message-ID: Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="VkRmmmXzMj956AdxXtqrqg"; logging-data="30621"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eJ1B/OZKC9cEoE5Kk+/4FWavL4W/uLls=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (darwin) Cancel-Lock: sha1:+HCRBU7M6Pk25yqjzQ95zB7rEGk= sha1:hjp4gpZRvO3uNEXN5SM39tQJYdc= Content-Type: text/plain; charset=us-ascii Date: 2012-06-12T10:31:17+01:00 List-Id: Using this code with GCC 4.6, 4.7 and GNAT GPL 2011, Str : aliased {a child of Root_Stream_Type}; subtype Short_Int is Integer range 0 .. 42; S : Short_Int; begin Integer'Output (Str'Access, -1); S := Short_Int'Input (Str'Access); Put_Line (S'Img & " " & S'Valid'Img); I get the output " 63 FALSE". My reading of AARM05 13.9.1(4..6) [1] is that - because S is a scalar object - S should not have been allowed to become abnormal; I think that, instead, some exception (Constraint_Error? Data_Error?) should have been raised. [1] http://www.adaic.org/resources/add_content/standards/05aarm/html/AA-13-9-1.html