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.6 required=5.0 tests=BAYES_05,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e6c08eac0355fd3d,start X-Google-Attributes: gid103376,public From: "Raymond W. Magness" Subject: A Win95 GNAT and UNIX GNAT incompatibility Date: 1996/11/11 Message-ID: <328825A5.2D@ucla.edu>#1/1 X-Deja-AN: 195996552 content-type: text/plain; charset=us-ascii organization: University of California, Los Angeles mime-version: 1.0 reply-to: magness@ucla.edu newsgroups: comp.lang.ada x-mailer: Mozilla 3.0Gold (Win95; I) Date: 1996-11-11T00:00:00+00:00 List-Id: Ladies and Gentlemen, In the course of finishing this project, I came across a version incompatibility between Win 95 GNAT and UNIX GNAT. What I found is: When you have a function that returns a pointer, UNIX GNAT does not like it when you immediately use that pointer to access a data element in the object being pointed to. Example: If the function GET_ITEM returns a pointer to an object LINE which is a record and has a field called DATA. Do NOT do this in UNIX GNAT (but is ok in Win95 GNAT): SOME_DATA := GET_ITEM.DATA; -- you will get a GNAT Bug Error! Unix likes this better: LINE_PTR := GET_ITEM; SOME_DATA := LINE_PTR.DATA; I don't know why it does this, but it cost me a couple of hours to figure it out :( I hope no one else has had to go through this. Later... -- Raymond W. Magness Sergeant, United States Marine Corps Computer Science, UCLA magness@ucla.edu http://www.seas.ucla.edu/~magness