comp.lang.ada
 help / color / mirror / Atom feed
From: "Robert I. Eachus" <rieachus@attbi.com>
Subject: Re: Misleading Compiler Warning
Date: Sun, 09 Feb 2003 03:14:38 GMT
Date: 2003-02-09T03:14:38+00:00	[thread overview]
Message-ID: <3E45C7D3.3020601@attbi.com> (raw)
In-Reply-To: x7vr8ap50by.fsf@smaug.pushface.org

Simon Wright wrote:
>% gnat make wmain.adc
>gcc -c -x ada wmain.adc
>gcc -c -x ada pack.adc
>pack.adc:9:03: warning: in instantiation at Gen.adc:4
>pack.adc:9:03: warning: value not in range of type "Standard.Integer"
>pack.adc:9:03: warning: "Constraint_Error" will be raised at run time
>gnatbind -x wmain.ali
>gnatlink wmain.ali
>
>The example runs on both compilers without raising a Constraint_Error.
>
>Is it just a misleading warning message ... if so, i send a
>bug-report to act.

Definitely not a bug, or the bug is not where you expect.  You are 
apparently compiling with integer range checking off.  So the warning is 
right, but of course, Constraint_Error will not be raised with these 
compiler options.

Try recompiling with -gnato
Enable numeric overflow checking (which is not normally enabled by default).





  reply	other threads:[~2003-02-09  3:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-02 14:58 Misleading Compiler Warning Volkert
2003-02-02 19:03 ` Jeffrey Carter
2003-02-03  6:04   ` Volkert
2003-02-03 16:54     ` Jeffrey Carter
2003-02-03  6:45 ` Simon Wright
2003-02-09  3:14   ` Robert I. Eachus [this message]
2003-02-09 15:31     ` Volkert
replies disabled

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