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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public X-Google-Thread: 10261c,90121986704b5776 X-Google-Attributes: gid10261c,public X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Yet another stupid language war (was: ... the only languages you need!!) Date: 1997/11/02 Message-ID: #1/1 X-Deja-AN: 287393926 References: <34557f2b.1934172@news.mindspring.com> <3458D116.2D34@pseserv3.fw.hac.com> <63anc7$75p$1@darla.visi.com> <345947D2.D20EF8E9@horvath.com> <63d34m$ap7$1@darla.visi.com> <01bce627$82afbec0$400d6dce@my-pc.neosoft.com> X-Complaints-To: usenet@news.nyu.edu X-Trace: news.nyu.edu 878482251 21038 (None) 128.122.140.58 Organization: New York University Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++,comp.lang.pascal.misc Date: 1997-11-02T00:00:00+00:00 List-Id: Simon wrote pogner[8]$ cat sizes.ads package Sizes is type T is range -32768 .. 32768; for T'Size use 16; end Sizes; pogner[9]$ gcc -c -gnatc sizes.ads sizes.ads:3:18: size for "T" too small, minimum allowed is 17 Robert notes For the above program, the error message from GNAT is most certainly correct, the given range does require 17 bits. Probably what is intended here is -32768 .. +32767, which on a 2's complement machine (i.e. pretty much all machines in practice), will fit in 16 bits fine. Robert Dewar Ada Core Technologies