comp.lang.ada
 help / color / mirror / Atom feed
* RedHat 9 / GCC 3.2.2 - Florist 3.15p compile error
@ 2003-09-26 14:07 Kurt
  2003-09-27 10:03 ` David Holm
  0 siblings, 1 reply; 2+ messages in thread
From: Kurt @ 2003-09-26 14:07 UTC (permalink / raw)



I looked for an FAQ, but no luck.

When I build Florist 3.14p or 3.15p with gcc 3.2.2, I get a range error:

gcc -c -O2 -gnatpg deps.adb
posix-signals.ads:121:33: warning: static value out of range of type 
"Signal" defined at line 57
posix-signals.ads:121:33: warning: "CONSTRAINT_ERROR" will be raised at 
run time
gnatmake: "deps.adb" compilation error
make: *** [deps] Error 4

I'm a little rusty at Ada, but looking at the code:

 From 'posix-c.ads':

    SIGRTMAX : constant := 64;
    SIGRTMIN : constant := 34;
    NSIGS : constant := 63;

 From 'posix-signals.ads':

    type Signal is
      new System.Interrupt_Management.Interrupt_ID'Base
      range 0 .. POSIX.C.NSIGS;
    for Signal'Size use POSIX.C.int'Size;
  subtype Realtime_Signal is Signal range
      POSIX.C.SIGRTMIN .. POSIX.C.SIGRTMAX;

I changed:

  subtype Realtime_Signal is Signal range
      POSIX.C.SIGRTMIN .. POSIX.C.SIGRTMAX;

to:

  subtype Realtime_Signal is Signal range
      POSIX.C.SIGRTMIN .. POSIX.C.NSIGS;

And, it compiled.  Any ideas on this?


--Kurt




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

* Re: RedHat 9 / GCC 3.2.2 - Florist 3.15p compile error
  2003-09-26 14:07 RedHat 9 / GCC 3.2.2 - Florist 3.15p compile error Kurt
@ 2003-09-27 10:03 ` David Holm
  0 siblings, 0 replies; 2+ messages in thread
From: David Holm @ 2003-09-27 10:03 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 1423 bytes --]

GNAT in GCC 3.2.2 is a very old prealpha of GNAT 5.0. I suggest you either install GNAT 3.15p
(which is stable) or GNAT 5.02 from ACT's CVS (which is not yet stable, but much more stable
than GCC 3.X).

//David Holm

On Fri, 26 Sep 2003 10:07:39 -0400
Kurt <kurt@spamnot.org> wrote:

> 
> I looked for an FAQ, but no luck.
> 
> When I build Florist 3.14p or 3.15p with gcc 3.2.2, I get a range error:
> 
> gcc -c -O2 -gnatpg deps.adb
> posix-signals.ads:121:33: warning: static value out of range of type 
> "Signal" defined at line 57
> posix-signals.ads:121:33: warning: "CONSTRAINT_ERROR" will be raised at 
> run time
> gnatmake: "deps.adb" compilation error
> make: *** [deps] Error 4
> 
> I'm a little rusty at Ada, but looking at the code:
> 
>  From 'posix-c.ads':
> 
>     SIGRTMAX : constant := 64;
>     SIGRTMIN : constant := 34;
>     NSIGS : constant := 63;
> 
>  From 'posix-signals.ads':
> 
>     type Signal is
>       new System.Interrupt_Management.Interrupt_ID'Base
>       range 0 .. POSIX.C.NSIGS;
>     for Signal'Size use POSIX.C.int'Size;
>   subtype Realtime_Signal is Signal range
>       POSIX.C.SIGRTMIN .. POSIX.C.SIGRTMAX;
> 
> I changed:
> 
>   subtype Realtime_Signal is Signal range
>       POSIX.C.SIGRTMIN .. POSIX.C.SIGRTMAX;
> 
> to:
> 
>   subtype Realtime_Signal is Signal range
>       POSIX.C.SIGRTMIN .. POSIX.C.NSIGS;
> 
> And, it compiled.  Any ideas on this?
> 
> 
> --Kurt
> 

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

end of thread, other threads:[~2003-09-27 10:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-26 14:07 RedHat 9 / GCC 3.2.2 - Florist 3.15p compile error Kurt
2003-09-27 10:03 ` David Holm

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