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.
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
- 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]
- 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
- 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]
Also available in: Atom
PDF
Like0
Like0Like0Like0