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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Compiler checking of String lengths during assignment (Newbie Question) Date: Sat, 10 Jan 2015 10:54:30 +0000 Organization: A noiseless patient Spider Message-ID: References: <77d434cc-00bc-4a2f-b50e-40736abdd2b2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="aa3eb2c524c8db378c1a383f7730f657"; logging-data="26315"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aTXKkSjy5a64yDfMnzmeTDhFyyoKOQQs=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:Skg1pXfB9eqgQm7Nik2VG1ZDoH4= sha1:Y2UO+tNAITVEYvdzNEqEMirGdig= Xref: news.eternal-september.org comp.lang.ada:24522 Date: 2015-01-10T10:54:30+00:00 List-Id: I just ran this and got warnings on all 3 lines, with GNAT GPL 2014, GCC 4.9.1, GCC 5.0 (experimental). isaac1.adb:8:12: warning: wrong length for array of subtype of "Standard.String" defined at line 2 isaac1.adb:8:12: warning: "Constraint_Error" will be raised at run time isaac1.adb:9:12: warning: too few elements for subtype of "Standard.String" defined at line 2 isaac1.adb:9:12: warning: "Constraint_Error" will be raised at run time isaac1.adb:10:12: warning: too few elements for subtype of "Standard.String" defined at line 2 isaac1.adb:10:12: warning: "Constraint_Error" will be raised at run time