Project

General

Profile

Bug #11853

"variable.c line 43: warning: modification of typedef with int ignored" on Solaris

Added by ngoto (Naohisa Goto) over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
[ruby-dev:49448]

Description

おそらく r50678 以降、Solaris 10 上の Oracle Solaris Studio 12.x にて、以下のWarningが出ています。

"variable.c", line 43: warning: modification of typedef with "int" ignored (E_MODIFY_TYPEDEF_IGNORED)

該当行周辺は以下のとおりです。(先頭コメントは行番号)

/* 37: */ struct ivar_update {
/* 38: */     union {
/* 39: */         st_table *iv_index_tbl;
/* 40: */         struct gen_ivtbl *ivtbl;
/* 41: */     } u;
/* 42: */     st_data_t index;
/* 43: */     int extended;
/* 44: */ };

cc -E でプリプロセッサ出力を出して調べてみると、
標準ヘッダ /usr/include/floatingpoint.h
(/usr/include/math.h 内から #include されている)
の以下の記述と衝突していることがわかりました。

typedef unsigned extended[3];

Illumos (旧OpenSolaris)でも同様のようです。
https://github.com/illumos/illumos-gate/blob/master/usr/src/head/floatingpoint.h#L84

幸い、元の構造体は variable.c 内部でしか使われていないので、
メンバ名を変更するだけで良さそうです。

Associated revisions

Revision 3bf3f825
Added by ngoto (Naohisa Goto) over 3 years ago

  • variable.c (struct ivar_update): rename "extended" to "iv_extended" to avoid name conflict with /usr/include/floatingpoint.h on Solaris. [Bug #11853] [ruby-dev:49448]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 53230
Added by ngoto (Naohisa Goto) over 3 years ago

  • variable.c (struct ivar_update): rename "extended" to "iv_extended" to avoid name conflict with /usr/include/floatingpoint.h on Solaris. [Bug #11853] [ruby-dev:49448]

Revision 53230
Added by ngoto (Naohisa Goto) over 3 years ago

  • variable.c (struct ivar_update): rename "extended" to "iv_extended" to avoid name conflict with /usr/include/floatingpoint.h on Solaris. [Bug #11853] [ruby-dev:49448]

Revision 53230
Added by ngoto (Naohisa Goto) over 3 years ago

  • variable.c (struct ivar_update): rename "extended" to "iv_extended" to avoid name conflict with /usr/include/floatingpoint.h on Solaris. [Bug #11853] [ruby-dev:49448]

Revision 53230
Added by ngoto (Naohisa Goto) over 3 years ago

  • variable.c (struct ivar_update): rename "extended" to "iv_extended" to avoid name conflict with /usr/include/floatingpoint.h on Solaris. [Bug #11853] [ruby-dev:49448]

Revision 53230
Added by ngoto (Naohisa Goto) over 3 years ago

  • variable.c (struct ivar_update): rename "extended" to "iv_extended" to avoid name conflict with /usr/include/floatingpoint.h on Solaris. [Bug #11853] [ruby-dev:49448]

History

#1

Updated by ngoto (Naohisa Goto) over 3 years ago

  • Status changed from Open to Closed

Applied in changeset r53230.


  • variable.c (struct ivar_update): rename "extended" to "iv_extended" to avoid name conflict with /usr/include/floatingpoint.h on Solaris. [Bug #11853] [ruby-dev:49448]

Updated by usa (Usaku NAKAMURA) over 3 years ago

  • Backport changed from 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONTNEED

Also available in: Atom PDF