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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c022fc5445abd13d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!gnilink.net!trndny03.POSTED!c2bfcbcf!not-for-mail Subject: Re: Discriminated types with default discriminants Newsgroups: comp.lang.ada References: From: "Ed Falis" Content-Type: text/plain; format=flowed; delsp=yes; charset=us-ascii MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID: User-Agent: Opera M2/8.50 (Linux, build 1358) Date: Thu, 03 Nov 2005 16:21:35 GMT NNTP-Posting-Host: 70.22.146.126 X-Complaints-To: abuse@verizon.net X-Trace: trndny03 1131034895 70.22.146.126 (Thu, 03 Nov 2005 11:21:35 EST) NNTP-Posting-Date: Thu, 03 Nov 2005 11:21:35 EST Xref: g2news1.google.com comp.lang.ada:6148 Date: 2005-11-03T16:21:35+00:00 List-Id: GNAT attempts to allocate the maximum size when an object with a defaulted discriminant is declared, since different sized values can be assigned to it. The alternative, used in the old Alsys compilers, is to allocate for the defaulted size, then perform reallocation during assignment if a differently sized value is assigned. Both approaches are allowed implementations with different tradeoffs.