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=-2.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,47bb539f07b52c30,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-15 06:17:24 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!isdnet!enst!enst.fr!not-for-mail From: Wilhelm Spickermann Newsgroups: comp.lang.ada Subject: How to get a compilation error Date: Thu, 15 Nov 2001 15:16:02 +0100 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: avanie.enst.fr 1005833842 81946 137.194.161.2 (15 Nov 2001 14:17:22 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 15 Nov 2001 14:17:22 +0000 (UTC) To: "comp.lang.ada" Return-Path: X-Mailer: Mulberry/2.1.1 (Linux/x86) Content-Disposition: inline X-Sender: 0211750756-0001@t-dialin.net Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.6 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:16565 Date: 2001-11-15T15:16:02+01:00 Hi, I would like to get a compilation *error*, if some compile time=20 constant is not suitable for the algorithm in use. Example: Chunk_Bits : constant :=3D Integer'Min (32, System.Max_Binary_Modulus / 2); type Check is (Checkitem1, Checkitem2); for Check'SIZE use 1 - Integer'MIN (96 mod Chunk_Bits, 1); The last two lines result in a compilation error, if and (I=20 hope) only if 96 is not a multiple of Chunk_Bits. That=B4s what = I=20 want -- but it=B4s really ugly. Does anyone have something = better? Wilhelm