comp.lang.ada
 help / color / mirror / Atom feed
* A Win95 GNAT and UNIX GNAT incompatibility
@ 1996-11-11  0:00 Raymond W. Magness
  1996-11-14  0:00 ` John English
  0 siblings, 1 reply; 3+ messages in thread
From: Raymond W. Magness @ 1996-11-11  0:00 UTC (permalink / raw)



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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1996-11-14  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-11  0:00 A Win95 GNAT and UNIX GNAT incompatibility Raymond W. Magness
1996-11-14  0:00 ` John English
1996-11-14  0:00   ` Robert Dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox