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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,11d70610d4cc79b7 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: storage size pragmas Date: 2000/05/08 Message-ID: <8f754a$t03$1@nnrp1.deja.com>#1/1 X-Deja-AN: 620772386 References: <3915BC28.A0D56A68@telepath.com> <20000507181719.23279.00001715@ng-fc1.aol.com> <8f6kko$944$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x43.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon May 08 19:38:53 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-05-08T00:00:00+00:00 List-Id: In article <8f6kko$944$1@nnrp1.deja.com>, Ted Dennison wrote: In article <8f6kko$944$1@nnrp1.deja.com>, Ted Dennison wrote: > I'm sorry if I may have misled you a bit here. One of the things that I > forgot is that Gnat (unlike most Ada compilers) does not default to full > checking. True. > Certian checks that are deemed by the compiler writers to be > more expensive than they are worth are turned off by default False (Ted, you don't know GNAT that well, so be careful about claims like this :-) There are many reasons why we choose to have certain modes as the default, the one you gave above is NOT the most common case at all. Other examples are: a) The RM provides for run-time checking of elaboration rules, leading to implementation dependent elaboration mode chaos that often causes huge problems in porting programs. GNAT by default checks elaboration at compile time using a static approach that is more efficient, and much safer. The choice here is not because of the expense of the check, but because we consider the static mode to be far preferable in every respect. b) Stack checking is off by default in all GCC compilers. We find it less confusing to have GNAT use the same defaults as other GCC compilers, rather than having the default options be language specific. c) The default compiler is determined by the extension, so if you want to ensure compilation in Ada rather than another language when you have a non-default file name, you must use the -x ada switch. d) We like to keep options consistent from one version of the compiler to another. So although at this stage -gnato is typically not a very expensive checking option, and could well be turned on by default, we prefer to keep the default the way it has been in the > even if that means it technicly isn't following the Ada standard. Nope, that's completely inaccurate. The standard has nothing to say about default options, and neither do the validation tests. All either requires is that you provide an Ada compiler that conforms to the Ada standard. It says nothing about the commands for running the compiler. Generally you need to look at the compiler documentation to see what set of options is required (this set of options will also be documented in the validation VSR). So it is quite wrong to say that GNAT is technically not following the Ada standard. It is right to say that a user not using the appropriate options and expecting to get accurate Ada semantics may be misusing the compiler (a common mistake among those allergic to reading documentatation :-) > Of course the standard also allows modes where the checks are turned off). Well, only as a special case that it allows an Ada compiler to do absolutely anything it likes under control of appropriate pragmas or compilation switches :-) Sent via Deja.com http://www.deja.com/ Before you buy.