Project

General

Profile

This project is closed and read-only.

Actions

Backport #5878

closed

compile error in string.c:2096 since r34236

Backport #5878: compile error in string.c:2096 since r34236

Added by ngoto (Naohisa Goto) over 14 years ago. Updated over 13 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 open — 1 closed)

Related to Backport193 - Backport #5890: Please backport r34236ClosedActions

Updated by ngoto (Naohisa Goto) over 14 years ago Actions #1

  • 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]

Updated by ngoto (Naohisa Goto) over 13 years ago Actions #2

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

please backport r34270, which is a bug fix of r34236

Updated by usa (Usaku NAKAMURA) over 13 years ago Actions #3

  • 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: PDF Atom