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: 103376,b084786fb95b5938 X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Adding Things to Package System Date: 1999/02/23 Message-ID: <36D31FC0.A39BEBAA@averstar.com>#1/1 X-Deja-AN: 447641829 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <1999Feb18.192159.18832@nosc.mil> Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-23T00:00:00+00:00 List-Id: Charles H. Sampson wrote: > > I've just come across what looks like an interesting bug in both > the Green Hills and ObjectAda compilers. This is not a compiler bug. It is presumably an attempt to provide backward compatibility with Ada 83 compilers. The GNAT approach to handling this problem is nice, but unfortunately it is also non-standard. >From the user perspective, the portable solution to your problem is to avoid having a "use" clause for package System, or to qualify any literal with Storage_Offset'(...). In general, because implementations are allowed to add arbitrary stuff to package System, you will always be opening your programs up to non-portability by putting in a "use System;". > I haven't received a reply to my bug report from Green Hills, It isn't a bug, just an implementation-dependent aspect of Ada. > ... yet this is legal code that the > compiler can't handle, in violation of 1.1.3(2). It is not portably "legal" code, unfortunately. It is code that is legal if there are no additions to package System, but as you point out, additions to package System are permitted. > Am I correct in assuming that 1.1.3(2) rules? No. Your code is not "universally" legal. To minimize non-portabilities, remove any "use" for package System. Use a rename if you find "System." too painful an addition at every reference to some declaration in package System. > Charlie > -- > ****** > > For an email response, my user name is "sampson" and my host > is "spawar.navy.mil". -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA