# Compile error in bignum.c line 3297 with old fcc on Solaris

**URL:** <https://www.ruby-forum.com/t/compile-error-in-bignum-c-line-3297-with-old-fcc-on-solaris/232933>\
**Category:** Development\
**Created:** [November 5, 2014, 4:23pm UTC](https://www.ruby-forum.com/t/compile-error-in-bignum-c-line-3297-with-old-fcc-on-solaris/232933 "2014-11-05T16:23:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [November 5, 2014, 4:23pm UTC](https://www.ruby-forum.com/t/compile-error-in-bignum-c-line-3297-with-old-fcc-on-solaris/232933/1 "2014-11-05T16:23:28Z")

</div>

Issue #10350 has been updated by Naohisa G…

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

> **[Bug #10350: compile error in bignum.c line 3297 with old fcc on Solaris -...](https://bugs.ruby-lang.org/issues/10350#change-49815)**
>
> Redmine

- Author: Naohisa G.
- Status: Closed
- Priority: Normal
- Assignee: Naohisa G.
- 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 にて、以下のコンパイルエラーが発生します。

```auto
"bignum.c", line 3297: error: initialization: constant expression is 
expected for variable: `nlz_bits_in_msbyte_bary'

```

以下のように変数の宣言と初期化を別々にしたらエラーなくビルドできました。

```auto
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)

```
