[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#182359: marked as done (gnat: Erroneous warning given for some correct programs)



Your message dated Tue, 30 Dec 2008 11:32:08 +0100
with message-id <1230633128.4959f8a88171d@www.versateladsl.be>
and subject line gnat: Erroneous warning given for some correct programs
has caused the Debian Bug report #182359,
regarding gnat: Erroneous warning given for some correct programs
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
182359: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=182359
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: gnat
Version: 3.14p-3
Severity: minor

The following program generates a compilation warning that a
Constraint_Error will be raised at runtime. It can clearly be seen that
the program is correct and will not raise an exception. While I realise
the example given is not sensible, this is a simplification of a segment
of code where it is reasonable.

--- BEGIN CODE ---
procedure Const_Warning is
   L: constant Integer:=1;
   type Test_Array is array (1..L) of Integer;
   A: Test_Array:=(others=>0);
begin
   for N in 1..L loop
      if N<L then
         A(N+1):=1;
      end if;
   end loop;
end Const_Warning;
--- END CODE ---

sjm217@maxwell:~/projects/ada/gnatbug$ gnatmake const_warning.adb
gnatgcc -c const_warning.adb
const_warning.adb:9:13: warning: value not in range of subtype of
"Standard.Integer" defined at line 3
const_warning.adb:9:13: warning: "Constraint_Error" will be raised at
run time
gnatbind -x const_warning.ali
gnatlink const_warning.ali

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux maxwell 2.4.20 #1 Sat Jan 18 13:48:50 GMT 2003 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages gnat depends on:
ii  libc6                         2.2.5-11.2 GNU C Library: Shared libraries an



--- End Message ---
--- Begin Message ---
Closing the bug as per Jörgen's information.

-- 
Ludovic Brenta.


--- End Message ---

Reply to: