From: Peter Teeson <peter.teeson@me.com>
To: 13342@debbugs.gnu.org
Cc: "Ludovic Courtès" <ludo@gnu.org>
Subject: bug#13342: Errors trying to build Guile 2.0.7 [PARTIALLY SOLVED]
Date: Tue, 08 Jan 2013 11:30:36 -0500 [thread overview]
Message-ID: <87D82FD7-F4FA-4516-9C31-8201F9EC172F@me.com> (raw)
In-Reply-To: <548C7791-6E30-43A9-9E38-05BEC03CEF8B@me.com>
[-- Attachment #1: Type: text/plain, Size: 1489 bytes --]
Hi Ludo:
I believe my conjecture that -1 was correct based on the following:
(0) I took the printf statements from my test program and placed them in
test-ffi-sum:
scm_t_int64 test_ffi_sum (scm_t_int8 a, scm_t_int16 b,
scm_t_int32 c, scm_t_int64 d);
scm_t_int64 test_ffi_sum (scm_t_int8 a, scm_t_int16 b,
scm_t_int32 c, scm_t_int64 d)
{
scm_t_int64 sum;
printf("scm_t_int64 d %" "ll" "d" " %#llX \n", d,d);
printf("scm_t_int32 c %" "d" " %#X \n", c,c);
printf("scm_t_int16 b %" "hd" " %#X \n", b,b);
printf("scm_t_int8 a %" "hh" "d" " %#X \n", a,a);
sum = d + c + b + a;
printf("scm_t_int64 sum %" "ll" "d" " %#llX \n", sum,sum);
a = -1; // NOTE re-assinging of a!
printf("scm_t_int16 a %" "hd" " %#X \n", a,a);
return d + c + b + a;
}
(1) Ran make
Making all in standalone
make all-am
CC libtest_ffi_la-test-ffi-lib.lo
CCLD libtest-ffi.la
and then make check
scm_t_int64 d 40000000000 0X9502F9000
scm_t_int32 c -30000 0XFFFF8AD0
scm_t_int16 b 2000 0X7D0
scm_t_int8 a -1 0XFF
scm_t_int64 sum 39999972255 0X9502F239F
scm_t_int16 a -1 0XFFFFFFFF
PASS: test-ffi
(2) Since scm_t_int8 is only 8 bits wide it's maximum value is 0xFF <=> 255
Reassigning "a" to be -1 allowed it to pass the test.
(3) Therefore I conclude that this is why the test fails (correctly IMHO).
You can only get a litre of milk into a litre jar!
(4) Where do we go from here?
respect
Peter
[-- Attachment #2: Type: text/html, Size: 5601 bytes --]
next prev parent reply other threads:[~2013-01-08 16:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-02 20:39 bug#13342: Errors trying to build Guile 2.0.7 Peter Teeson
2013-01-03 15:22 ` Ludovic Courtès
[not found] ` <BA2BEFFD-26D7-428B-A455-C7CDC2DB970C@me.com>
2013-01-04 2:18 ` Peter Teeson
2013-01-04 2:21 ` Peter Teeson
2013-01-04 17:23 ` Ludovic Courtès
[not found] ` <895C23AD-DD0D-40FC-AD5F-6CEF52365444@me.com>
2013-01-08 16:08 ` bug#13386: Fwd: " Peter Teeson
2013-01-30 22:13 ` bug#13386: bug#13342: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) , bug#13386: closed (Re: bug#13342: Errors trying to build Guile 2.0.7) Peter Teeson
2013-01-31 20:20 ` Mark H Weaver
2013-02-01 2:05 ` bug#13386: " Peter Teeson
2013-02-02 13:11 ` Mark H Weaver
2013-02-03 0:05 ` Peter Teeson
2013-02-03 3:22 ` bug#13386: " Mark H Weaver
2013-01-08 16:08 ` bug#13342: [PARTIALLY SOLVED] bug#13342: Errors trying to build Guile 2.0.7 Peter Teeson
2013-01-27 14:11 ` Ludovic Courtès
2013-01-27 21:35 ` Peter Teeson
2013-01-28 1:46 ` Mark H Weaver
2013-01-28 2:40 ` Peter Teeson
2013-01-28 12:56 ` Ludovic Courtès
2013-01-28 16:39 ` Peter Teeson
2013-01-28 16:55 ` Ludovic Courtès
2013-01-08 16:30 ` Peter Teeson [this message]
2013-01-30 8:34 ` Mark H Weaver
2013-01-30 21:37 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87D82FD7-F4FA-4516-9C31-8201F9EC172F@me.com \
--to=peter.teeson@me.com \
--cc=13342@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).