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!feeder.eternal-september.org!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!news-1.dfn.de!news.dfn.de!news.uni-weimar.de!medsec1.medien.uni-weimar.de!lucks From: Stefan.Lucks@uni-weimar.de Newsgroups: comp.lang.ada Subject: Re: Compiler checking of String lengths during assignment (Newbie Question) Date: Sat, 10 Jan 2015 00:20:11 +0100 Organization: Bauhaus-Universitaet Weimar Message-ID: References: <77d434cc-00bc-4a2f-b50e-40736abdd2b2@googlegroups.com> NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-1989297411-1420845611=:19658" X-Trace: pinkpiglet.scc.uni-weimar.de 1420845793 29910 141.54.178.228 (9 Jan 2015 23:23:13 GMT) X-Complaints-To: news@pinkpiglet.scc.uni-weimar.de NNTP-Posting-Date: Fri, 9 Jan 2015 23:23:13 +0000 (UTC) X-X-Sender: lucks@debian In-Reply-To: User-Agent: Alpine 2.11 (DEB 23 2013-08-11) Xref: news.eternal-september.org comp.lang.ada:24515 Date: 2015-01-10T00:20:11+01:00 List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1989297411-1420845611=:19658 Content-Type: TEXT/PLAIN; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Fri, 9 Jan 2015, Simon Wright wrote: >> The first 2 cases produces an error during the build, as expected, >> because Head is known to be length of 5 and I'm assigning something of >> a different length. I believe, all three should generate a run-time error (most likely a=20 Constraint_Error). But a good compiler should also warn you about the run-time error, and=20 maybe you have set your compiler to treat warnings as errors (which is not a bad idea). >> The 3rd assignment there does NOT produce an error, no warning no >> nothing even though this clearly violates the same check. This is a compiler bug! ------ I love the taste of Cryptanalysis in the morning! ------ --Stefan.Lucks (at) uni-weimar.de, Bauhaus-Universit=E4t Weimar, Germany-- --8323329-1989297411-1420845611=:19658--