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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a1d2fe1ec5136718 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local02.nntp.dca.giganews.com!nntp.bt.com!news.bt.com.POSTED!not-for-mail NNTP-Posting-Date: Wed, 18 Jun 2008 09:12:25 -0500 From: Brian Drummond Newsgroups: comp.lang.ada Subject: Re: Generic warning Date: Wed, 18 Jun 2008 15:16:42 +0100 Reply-To: brian@shapes.demon.co.uk Message-ID: <626i5415pe8s2jekhij85k4algrh9i1jfo@4ax.com> References: <4858CA3B.7030101@gmail.com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Usenet-Provider: http://www.giganews.com X-AuthenticatedUsername: NoAuthUser X-Trace: sv3-VMUppE9RrQoaqMabD1PElGpwTJbMSwKoopfhXY+oZw9jWmJivDnRtSlw6B9vN+dwHxWT7P3wCNGUCNy!ZPlK0WCbK9GKhO7VsF8TzcOoYSFGwlNWaXwLfrtBvydt5wVGna5zLSYhhwzwEvcNfD0lpuaEpuGM!GQ== X-Complaints-To: abuse@btinternet.com X-DMCA-Complaints-To: abuse@btinternet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 Xref: g2news1.google.com comp.lang.ada:760 Date: 2008-06-18T15:16:42+01:00 List-Id: On Wed, 18 Jun 2008 08:41:31 +0000, S�bastien Morand wrote: >-----BEGIN PGP SIGNED MESSAGE----- >Hash: SHA1 > > >> The problem is here. You instantiate TestGen with Order = 1. So the upper >> bound of Buffer is 2. Therefore the range is 1+2..Index, which should cause >> Constraint_Error in Buffer(I). > >I understand, if Order = 1, then the code could never occur. > >Anyway, There is a test just before in the real code that avoid the >impossible situation (index is between 1 and Order*2 always). (Newbie qiestion, coming from VHDL, halfway through the Barnes book) Can you not create a subtype of Positive to reflect that, and declare both the array and index using that subtype? - Brian