Project

General

Profile

Actions

Backport #5878

closed

compile error in string.c:2096 since r34236

Added by ngoto (Naohisa Goto) over 12 years ago. Updated about 11 years ago.

Status:
Closed
[ruby-dev:45123]

Description

r34236 以降、Solaris 10 上の Fujitsu fcc 5.6 にて、string.c の2096行目がコンパイルエラーになります。

"string.c", line 2096: error: initialization: constant expression is expected fo
r variable: `buf'

以下のパッチでコンパイルが通り、Error/Failureが増えていないことを確認しました。

Index: string.c

--- string.c (revision 34265)
+++ string.c (working copy)
@@ -2093,7 +2093,8 @@

 if (enc == rb_usascii_encoding()) {
/* US-ASCII automatically extended to ASCII-8BIT */
  • char buf[1] = {(char)code};
  • char buf[1];
  • buf[0] = (char)code;
    if (code > 0xFF) {
    rb_raise(rb_eRangeError, "%u out of char range", code);
    }

Files

string.c.patch (416 Bytes) string.c.patch ngoto (Naohisa Goto), 01/11/2012 11:36 PM

Related issues 1 (0 open1 closed)

Related to Backport193 - Backport #5890: Please backport r34236Closed01/13/2012Actions
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0