comp.lang.ada
 help / color / mirror / Atom feed
From: "Paul H. Whittington" <75240.505@compuserve.com>
Subject: GNAT 2.00 - What "ambiguous expression"
Date: 26 Mar 1995 08:15:49 GMT
Date: 1995-03-26T08:15:49+00:00	[thread overview]
Message-ID: <3l37rl$7dm@mica.inel.gov> (raw)

When I compile the program in file "testse.adb" with GNAT 2.00 using GCC 2.6.2
under Windows NT 3.5 Workstation I get the compiler execution results shown.

What is going on here?
Why is anything in package Unsign visible in package System.Storage_Elements?


Compiler Execution Results:
---------------------------
D:\a\gnat\sage>gcc -c -v test/testse.adb
Reading specs from \gnat200\lib\gcc-lib\i586-ibm-winnt3.5\2.6.2\specs
gcc version 2.6.2
\gnat200\lib\gcc-lib\i586-ibm-winnt3.5\2.6.2\gnat1.exe -quiet -dumpbase testse.ada test/testse.adb -o C:\temp\cc000137.s
\gnat200\adainclude/s-stoele.ads:24:06: ambiguous expression (cannot resolve ""-"")
\gnat200\adainclude/s-stoele.ads:24:06: possible interpretation at unsign.ads:11
\gnat200\adainclude/s-stoele.ads:24:06: possible interpretation at unsign.ads:8
compilation abandoned
gcc: Internal compiler error: program gnat1 got fatal signal 1


File: testse.adb
----------------
01:  with Unsign; use Unsign;
02:
03:  procedure TestSE is
04:     lf  : character := ascii.lf;
05:     str : string    := "Help" & lf;
06:  begin
07:    null;
08:  end TestSE;


File: Unsign.ads
----------------
01:  with Interfaces;
02:
03:  package Unsign is
04:
05:  subtype byte  is Interfaces.Unsigned_8;
06:  subtype word  is Interfaces.Unsigned_16;
07:
08:  function "-"   (Right : byte) return byte
09:    renames Interfaces."-";
10:
11:  function "-"   (Right : word) return word
12:    renames Interfaces."-";
13:
14:  end Unsign;


File: s-stoele.ads (first few lines)
------------------------------------
23:     type Storage_Offset is range
24:       -(2 ** (Standard'Address_Size - 1)) ..
25:       +(2 ** (Standard'Address_Size - 1)) - 1;




             reply	other threads:[~1995-03-26  8:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-03-26  8:15 Paul H. Whittington [this message]
1995-03-27 23:19 ` GNAT 2.00 - What "ambiguous expression" Robert Dewar
1995-03-28  3:59   ` GNAT 2.00 - What Paul H. Whittington
replies disabled

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