From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,60c8b2ba217a0a9d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news.glorb.com!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: gnade error Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Tue, 14 Nov 2006 10:20:29 +0100 Message-ID: <3vmrpanvy3t6.2nhar4s7o38x.dlg@40tude.net> NNTP-Posting-Date: 14 Nov 2006 10:20:29 CET NNTP-Posting-Host: 9a2c04a8.newsspool4.arcor-online.net X-Trace: DXC=[SRTFg?Bf]D[6=1B@oB@@@4IUK 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