* [ruby-dev:48608] [ruby-trunk - Bug #10350] [Open] compile error in bignum.c line 3297 with old fcc on Solaris
[not found] <redmine.issue-10350.20141009142808@ruby-lang.org>
@ 2014-10-09 14:28 ` ngotogenome
2014-10-09 14:36 ` [ruby-dev:48609] [ruby-trunk - Bug #10350] [Closed] " ngotogenome
` (2 subsequent siblings)
3 siblings, 0 replies; 4+ messages in thread
From: ngotogenome @ 2014-10-09 14:28 UTC (permalink / raw
To: ruby-dev
Issue #10350 has been reported by Naohisa Goto.
----------------------------------------
Bug #10350: compile error in bignum.c line 3297 with old fcc on Solaris
https://bugs.ruby-lang.org/issues/10350
* Author: Naohisa Goto
* Status: Open
* Priority: Normal
* Assignee: Naohisa Goto
* Category: build
* Target version:
* ruby -v: ruby 2.2.0dev (2014-10-09) [sparc64-solaris2.10]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
Solaris上の古い fcc (Fujitsu C compiler) 5.6 にて、以下のコンパイルエラーが発生します。
~~~
"bignum.c", line 3297: error: initialization: constant expression is expected for variable: `nlz_bits_in_msbyte_bary'
~~~
以下のように変数の宣言と初期化を別々にしたらエラーなくビルドできました。
~~~
Index: bignum.c
===================================================================
--- bignum.c (revision 47859)
+++ bignum.c (working copy)
@@ -3294,7 +3294,7 @@
static const BDIGIT char_bit[1] = { CHAR_BIT };
BDIGIT numbytes_bary[bdigit_roomof(sizeof(numbytes))];
BDIGIT val_numbits_bary[bdigit_roomof(sizeof(numbytes) + 1)];
- BDIGIT nlz_bits_in_msbyte_bary[1] = { nlz_bits_in_msbyte };
+ BDIGIT nlz_bits_in_msbyte_bary[1];
BDIGIT word_numbits_bary[bdigit_roomof(sizeof(word_numbits))];
BDIGIT div_bary[numberof(val_numbits_bary) + BIGDIVREM_EXTRA_WORDS];
BDIGIT mod_bary[numberof(word_numbits_bary)];
@@ -3304,6 +3304,8 @@
int sign;
size_t numwords;
+ nlz_bits_in_msbyte_bary[0] = nlz_bits_in_msbyte;
+
/*
* val_numbits = numbytes * CHAR_BIT - nlz_bits_in_msbyte
* div, mod = val_numbits.divmod(word_numbits)
~~~
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-dev:48609] [ruby-trunk - Bug #10350] [Closed] compile error in bignum.c line 3297 with old fcc on Solaris
[not found] <redmine.issue-10350.20141009142808@ruby-lang.org>
2014-10-09 14:28 ` [ruby-dev:48608] [ruby-trunk - Bug #10350] [Open] compile error in bignum.c line 3297 with old fcc on Solaris ngotogenome
@ 2014-10-09 14:36 ` ngotogenome
2014-11-05 15:22 ` [ruby-dev:48734] [ruby-trunk - Bug #10350] " ngotogenome
2014-11-06 14:20 ` [ruby-dev:48735] " nagachika00
3 siblings, 0 replies; 4+ messages in thread
From: ngotogenome @ 2014-10-09 14:36 UTC (permalink / raw
To: ruby-dev
Issue #10350 has been updated by Naohisa Goto.
Status changed from Open to Closed
% Done changed from 0 to 100
Applied in changeset r47860.
----------
* bignum.c (absint_numwords_generic): set an array element after
definition of a variable to fix compile error with older version
of fcc (Fujitsu C Compiler) 5.6 on Solaris 10 on Sparc.
[Bug #10350] [ruby-dev:48608]
----------------------------------------
Bug #10350: compile error in bignum.c line 3297 with old fcc on Solaris
https://bugs.ruby-lang.org/issues/10350#change-49319
* Author: Naohisa Goto
* Status: Closed
* Priority: Normal
* Assignee: Naohisa Goto
* Category: build
* Target version:
* ruby -v: ruby 2.2.0dev (2014-10-09) [sparc64-solaris2.10]
* Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN
----------------------------------------
Solaris上の古い fcc (Fujitsu C compiler) 5.6 にて、以下のコンパイルエラーが発生します。
~~~
"bignum.c", line 3297: error: initialization: constant expression is expected for variable: `nlz_bits_in_msbyte_bary'
~~~
以下のように変数の宣言と初期化を別々にしたらエラーなくビルドできました。
~~~
Index: bignum.c
===================================================================
--- bignum.c (revision 47859)
+++ bignum.c (working copy)
@@ -3294,7 +3294,7 @@
static const BDIGIT char_bit[1] = { CHAR_BIT };
BDIGIT numbytes_bary[bdigit_roomof(sizeof(numbytes))];
BDIGIT val_numbits_bary[bdigit_roomof(sizeof(numbytes) + 1)];
- BDIGIT nlz_bits_in_msbyte_bary[1] = { nlz_bits_in_msbyte };
+ BDIGIT nlz_bits_in_msbyte_bary[1];
BDIGIT word_numbits_bary[bdigit_roomof(sizeof(word_numbits))];
BDIGIT div_bary[numberof(val_numbits_bary) + BIGDIVREM_EXTRA_WORDS];
BDIGIT mod_bary[numberof(word_numbits_bary)];
@@ -3304,6 +3304,8 @@
int sign;
size_t numwords;
+ nlz_bits_in_msbyte_bary[0] = nlz_bits_in_msbyte;
+
/*
* val_numbits = numbytes * CHAR_BIT - nlz_bits_in_msbyte
* div, mod = val_numbits.divmod(word_numbits)
~~~
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-dev:48734] [ruby-trunk - Bug #10350] compile error in bignum.c line 3297 with old fcc on Solaris
[not found] <redmine.issue-10350.20141009142808@ruby-lang.org>
2014-10-09 14:28 ` [ruby-dev:48608] [ruby-trunk - Bug #10350] [Open] compile error in bignum.c line 3297 with old fcc on Solaris ngotogenome
2014-10-09 14:36 ` [ruby-dev:48609] [ruby-trunk - Bug #10350] [Closed] " ngotogenome
@ 2014-11-05 15:22 ` ngotogenome
2014-11-06 14:20 ` [ruby-dev:48735] " nagachika00
3 siblings, 0 replies; 4+ messages in thread
From: ngotogenome @ 2014-11-05 15:22 UTC (permalink / raw
To: ruby-dev
Issue #10350 has been updated by Naohisa Goto.
Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN to 2.0.0: DONTNEED, 2.1: REQUIRED
----------------------------------------
Bug #10350: compile error in bignum.c line 3297 with old fcc on Solaris
https://bugs.ruby-lang.org/issues/10350#change-49815
* Author: Naohisa Goto
* Status: Closed
* Priority: Normal
* Assignee: Naohisa Goto
* Category: build
* Target version:
* ruby -v: ruby 2.2.0dev (2014-10-09) [sparc64-solaris2.10]
* Backport: 2.0.0: DONTNEED, 2.1: REQUIRED
----------------------------------------
Solaris上の古い fcc (Fujitsu C compiler) 5.6 にて、以下のコンパイルエラーが発生します。
~~~
"bignum.c", line 3297: error: initialization: constant expression is expected for variable: `nlz_bits_in_msbyte_bary'
~~~
以下のように変数の宣言と初期化を別々にしたらエラーなくビルドできました。
~~~
Index: bignum.c
===================================================================
--- bignum.c (revision 47859)
+++ bignum.c (working copy)
@@ -3294,7 +3294,7 @@
static const BDIGIT char_bit[1] = { CHAR_BIT };
BDIGIT numbytes_bary[bdigit_roomof(sizeof(numbytes))];
BDIGIT val_numbits_bary[bdigit_roomof(sizeof(numbytes) + 1)];
- BDIGIT nlz_bits_in_msbyte_bary[1] = { nlz_bits_in_msbyte };
+ BDIGIT nlz_bits_in_msbyte_bary[1];
BDIGIT word_numbits_bary[bdigit_roomof(sizeof(word_numbits))];
BDIGIT div_bary[numberof(val_numbits_bary) + BIGDIVREM_EXTRA_WORDS];
BDIGIT mod_bary[numberof(word_numbits_bary)];
@@ -3304,6 +3304,8 @@
int sign;
size_t numwords;
+ nlz_bits_in_msbyte_bary[0] = nlz_bits_in_msbyte;
+
/*
* val_numbits = numbytes * CHAR_BIT - nlz_bits_in_msbyte
* div, mod = val_numbits.divmod(word_numbits)
~~~
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ruby-dev:48735] [ruby-trunk - Bug #10350] compile error in bignum.c line 3297 with old fcc on Solaris
[not found] <redmine.issue-10350.20141009142808@ruby-lang.org>
` (2 preceding siblings ...)
2014-11-05 15:22 ` [ruby-dev:48734] [ruby-trunk - Bug #10350] " ngotogenome
@ 2014-11-06 14:20 ` nagachika00
3 siblings, 0 replies; 4+ messages in thread
From: nagachika00 @ 2014-11-06 14:20 UTC (permalink / raw
To: ruby-dev
Issue #10350 has been updated by Tomoyuki Chikanaga.
Backport changed from 2.0.0: DONTNEED, 2.1: REQUIRED to 2.0.0: DONTNEED, 2.1: DONE
Backported into `ruby_2_1` at r48303.
----------------------------------------
Bug #10350: compile error in bignum.c line 3297 with old fcc on Solaris
https://bugs.ruby-lang.org/issues/10350#change-49829
* Author: Naohisa Goto
* Status: Closed
* Priority: Normal
* Assignee: Naohisa Goto
* Category: build
* Target version:
* ruby -v: ruby 2.2.0dev (2014-10-09) [sparc64-solaris2.10]
* Backport: 2.0.0: DONTNEED, 2.1: DONE
----------------------------------------
Solaris上の古い fcc (Fujitsu C compiler) 5.6 にて、以下のコンパイルエラーが発生します。
~~~
"bignum.c", line 3297: error: initialization: constant expression is expected for variable: `nlz_bits_in_msbyte_bary'
~~~
以下のように変数の宣言と初期化を別々にしたらエラーなくビルドできました。
~~~
Index: bignum.c
===================================================================
--- bignum.c (revision 47859)
+++ bignum.c (working copy)
@@ -3294,7 +3294,7 @@
static const BDIGIT char_bit[1] = { CHAR_BIT };
BDIGIT numbytes_bary[bdigit_roomof(sizeof(numbytes))];
BDIGIT val_numbits_bary[bdigit_roomof(sizeof(numbytes) + 1)];
- BDIGIT nlz_bits_in_msbyte_bary[1] = { nlz_bits_in_msbyte };
+ BDIGIT nlz_bits_in_msbyte_bary[1];
BDIGIT word_numbits_bary[bdigit_roomof(sizeof(word_numbits))];
BDIGIT div_bary[numberof(val_numbits_bary) + BIGDIVREM_EXTRA_WORDS];
BDIGIT mod_bary[numberof(word_numbits_bary)];
@@ -3304,6 +3304,8 @@
int sign;
size_t numwords;
+ nlz_bits_in_msbyte_bary[0] = nlz_bits_in_msbyte;
+
/*
* val_numbits = numbytes * CHAR_BIT - nlz_bits_in_msbyte
* div, mod = val_numbits.divmod(word_numbits)
~~~
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-11-06 14:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <redmine.issue-10350.20141009142808@ruby-lang.org>
2014-10-09 14:28 ` [ruby-dev:48608] [ruby-trunk - Bug #10350] [Open] compile error in bignum.c line 3297 with old fcc on Solaris ngotogenome
2014-10-09 14:36 ` [ruby-dev:48609] [ruby-trunk - Bug #10350] [Closed] " ngotogenome
2014-11-05 15:22 ` [ruby-dev:48734] [ruby-trunk - Bug #10350] " ngotogenome
2014-11-06 14:20 ` [ruby-dev:48735] " nagachika00
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).