Project

General

Profile

Actions

Bug #11853

closed

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

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

Added by ngoto (Naohisa Goto) almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
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 内部でしか使われていないので、
メンバ名を変更するだけで良さそうです。

Updated by ngoto (Naohisa Goto) almost 10 years ago Actions #1

  • 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) almost 10 years ago Actions #2 [ruby-dev:49488]

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

Also available in: PDF Atom