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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1ff5003422436e4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-27 11:52:38 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!EU.net!uunet!noc.near.net!inmet!dsd!bobduff From: bobduff@dsd.camb.inmet.com (Bob Duff) Subject: Re: Easily-Read C++? Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. References: <389vqv$i6n@source.asset.com> <38k8g2INNiff@marble.summit.novell.com> Date: Thu, 27 Oct 1994 14:54:46 GMT Date: 1994-10-27T14:54:46+00:00 List-Id: In article <38k8g2INNiff@marble.summit.novell.com>, -mlc-+Schilling J. wrote: >Pragma Suppress doesn't relate to carrying around array bounds at runtime, >but rather to whether index checks are done. If the array bounds are >dynamic, then it is necessary to carry them around in order to generate >correct indexing offset code, whether or not you are also doing the checks. I don't think that's quite right. The compiler can always store the address of the zero-th element (even if there is no such element), and then the indexing calculation doesn't need to subtract the lower bound. Thus, if checks are suppressed, there should be no need to store the bounds. On the other hand, if there are any whole-array assignments, then the size has to be stored (or some information from which the size can be calculated). I don't know how many compilers use zero-based arrays. I believe GNAT does. I don't know how many compilers are clever enough to make pragma Suppress not only suppress the checking code, but also the data necessary to perform the checks. It could get tricky, especially in the presence of separate compilation. - Bob -- Bob Duff bobduff@inmet.com Oak Tree Software, Inc. Ada 9X Mapping/Revision Team (Intermetrics, Inc.)