comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: gnade error
Date: Tue, 14 Nov 2006 10:20:29 +0100
Date: 2006-11-14T10:20:29+01:00	[thread overview]
Message-ID: <3vmrpanvy3t6.2nhar4s7o38x.dlg@40tude.net> (raw)
In-Reply-To: sa464dicuwz.fsf@margay.local

On Tue, 14 Nov 2006 19:08:28 +1100, Brian May wrote:

> What does the following error mean:
> 
> make core-all >>build.log
> gnatmake: "/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/linux-gnu-powerpc-libexec/prep" up to date.
> gnatmake: "/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/linux-gnu-powerpc-libexec/cfgget" up to date.
> gnatmake: "/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/linux-gnu-powerpc-libexec/cfgset" up to date.
> gnatmake: "/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/linux-gnu-powerpc-libexec/prep" up to date.
> gnatmake: "/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/linux-gnu-powerpc-libexec/cfgget" up to date.
> gnatmake: "/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/linux-gnu-powerpc-libexec/cfgset" up to date.
> gnatmake: "/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/linux-gnu-powerpc-libexec/prep" up to date.
> gnatmake: "/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/linux-gnu-powerpc-libexec/cfgget" up to date.
> gnatmake: "/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/linux-gnu-powerpc-libexec/cfgset" up to date.
> completed 1 out of 6 (16%)...
> completed 2 out of 6 (33%)...
> completed 3 out of 6 (50%)...
> completed 4 out of 6 (66%)...
> completed 5 out of 6 (83%)...
> completed 6 out of 6 (100%)...
> gnatmake: objects up to date.
> make odbc-all >>build.log
> gcc-4.1 -c -g -gnatQ -I/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/linux-gnu-powerpc-include -g -O3 -gnatn -gnatf -gnatwa -gnatwL -gnaty3abefhiklM120prtn -I- -gnatA /home/bam/tmp/ada/gnade/gnade-src-1.5.3b/dbi/odbc/gnu-db-sqlcli-dispatch-a_array.adb
> gnu-db-sqlcli.adb:134:42: cannot inline "To_Ada" (call returns unconstrained type)
> gnatmake: "/home/bam/tmp/ada/gnade/gnade-src-1.5.3b/dbi/odbc/gnu-db-sqlcli-dispatch-a_array.adb" compilation error
> make[3]: *** [all] Error 4
> make[2]: *** [odbc] Error 2
> make[1]: *** [odbc-all] Error 2
> make: *** [all] Error 2
> 
> The code in question is:
> 
>    function To_Ada (State : C_SQLSTATE) return SQLSTATE is
>       use Ada.Strings.Fixed;
>       S : constant String := Interfaces.C.To_Ada (State, False);
>       R : SQLSTATE;
>    begin
>       Move (Source => S, Target => R);
>       SQLFixNTS (R);
>       return R;
>    end To_Ada;
> 
> It looks OK to me...

[ I had submitted this to GNADE, it was confirmed as a bug, but I am not
sure if that isn't actually a GNAT bug. ]

I rewrote it without all that conversion stuff, and it worked fine. After
all it is all about a 5-character C array being converted to a string!
(:-))

See:

http://sourceforge.net/tracker/index.php?func=detail&aid=1559830&group_id=23045&atid=377331

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2006-11-14  9:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-14  8:08 gnade error Brian May
2006-11-14  9:20 ` Dmitry A. Kazakov [this message]
2006-11-14 13:42 ` Stephen Leake
2006-11-14 17:01   ` Jeffrey R. Carter
2006-11-14 17:52     ` Adam Beneschan
2006-11-15  1:23       ` Jeffrey R. Carter
2006-11-15 14:28         ` Robert A Duff
2006-11-14 23:52   ` Brian May
2006-11-15  0:07     ` Ludovic Brenta
replies disabled

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