comp.lang.ada
 help / color / mirror / Atom feed
From: falis@ma.aonix.com (Ed Falis)
Subject: Re: simple question - how to emulate void * ?
Date: 1998/10/23
Date: 1998-10-23T00:00:00+00:00	[thread overview]
Message-ID: <1104_909142646@DZOG-CHEN> (raw)
In-Reply-To: 70pfpm$qe5@gcsin3.geccs.gecm.com

> Hans Marqvardsen <hm@ddre.dk> wrote:
> 
> Works on Irix 6.4, GNAT 3.07 (?)
> 
> <..snip..>
> 
> >>          Temp := Temp + 1;
> 
> >Strangely, using OA 7.1.1 it wont compile.
> >Error message:
> >          Temp := Temp + 1;
> > Line 20 col 23: the expression is ambiguous.
> 

In OA, both System and System.Storage_Units declare "+" operators with Address and Integer or Storage_Offset respectively.  Since there are use clauses 
for both units, the compiler doesn't know how to interpret the numeric literal  "1" on the right hand side of the expression.

So, eliminate one of the use clauses, or qualify the literal, e.g. Integer'(1) or Storage_Offset'(1), and the code will compile and execute.

My guess is that the address arithmetic in OA System was left in for compatibility with the Alsys Ada 83 compilers it replaced.

- Ed Falis
Aonix




  parent reply	other threads:[~1998-10-23  0:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-23  0:00 simple question - how to emulate void * ? Craig Allen
1998-10-23  0:00 ` Dale Stanbrough
1998-10-22  0:00   ` Hans Marqvardsen
1998-10-22  0:00   ` Hans Marqvardsen
1998-10-23  0:00     ` John McCabe
1998-10-23  0:00       ` dennison
1998-10-23  0:00       ` Ed Falis [this message]
1998-10-23  0:00         ` dennison
1998-10-24  0:00           ` Joe Wisniewski
1998-10-25  0:00           ` dewar
1998-10-24  0:00         ` Dale Stanbrough
1998-10-24  0:00           ` Tucker Taft
1998-10-24  0:00           ` Robert A Duff
1998-10-23  0:00   ` David C. Hoos, Sr.
1998-10-23  0:00   ` David C. Hoos, Sr.
1998-10-23  0:00 ` Jeff Carter
1998-10-24  0:00   ` Dale Stanbrough
1998-10-25  0:00     ` dewar
1998-10-23  0:00 ` Tom Moran
1998-11-05  0:00 ` Craig Allen
1998-11-06  0:00   ` Dale Stanbrough
1998-11-06  0:00     ` Matthew Heaney
1998-11-06  0:00       ` dewarr
1998-11-06  0:00   ` Tom Moran
replies disabled

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