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 #1

Updated by ngoto (Naohisa Goto) over 12 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r34270.
Naohisa, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • string.c (rb_str_concat): set array element after definition
    to fix compile error with Fujitsu C Compiler 5.6 on Solaris 10
    on Sparc. [Bug #5878] [ruby-dev:45123]
Actions #2

Updated by ngoto (Naohisa Goto) about 11 years ago

  • Tracker changed from Bug to Backport
  • Project changed from Ruby master to Backport193
  • Status changed from Closed to Assigned
  • Assignee set to usa (Usaku NAKAMURA)

please backport r34270, which is a bug fix of r34236

Actions #3

Updated by usa (Usaku NAKAMURA) about 11 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r40229.
Naohisa, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 34270: [Backport #5858]

* string.c (rb_str_concat): set array element after definition
  to fix compile error with Fujitsu C Compiler 5.6 on Solaris 10
  on Sparc.  [Bug #5878] [ruby-dev:45123]
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0