[#27417] selector namespace — Shugo Maeda <shugo@...>

前田です。

17 messages 2005/10/13

[#27458] Matrix class is broken without mathn — akira yamada / やまだあきら <akira@...>

Debianユーザからrequire "mathn"しないときに

28 messages 2005/10/19
[#27461] Re: Matrix class is broken without mathn — Yukihiro Matsumoto <matz@...> 2005/10/19

まつもと ゆきひろです

[#27596] Re: Matrix class is broken without mathn — Masahiro Sakai (酒井政裕) <sakai@...> 2005/10/31

酒井といいます。

[#27601] Re: Matrix class is broken without mathn — Yukihiro Matsumoto <matz@...> 2005/10/31

まつもと ゆきひろです

[#27605] Re: Matrix class is broken without mathn — keiju@... (石塚圭樹) 2005/10/31

けいじゅ@いしつかです.

[#27691] Re: Matrix class is broken without mathn — Shin-ichiro HARA <sinara@...> 2005/11/12

原です。

[#27700] Re: Matrix class is broken without mathn — keiju@... (石塚圭樹) 2005/11/14

けいじゅ@いしつかです.

[#27484] 1.8.4 feature freeze? — "URABE Shyouhei aka. mput" <root@...>

卜部です。

19 messages 2005/10/23
[#27485] Re: 1.8.4 feature freeze? — Yukihiro Matsumoto <matz@...> 2005/10/23

まつもと ゆきひろです

[#27492] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

20 messages 2005/10/24
[#27493] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — Yukihiro Matsumoto <matz@...> 2005/10/24

まつもと ゆきひろです

[#27494] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — WATANABE Hirofumi <eban@...> 2005/10/24

わたなべです。

[#27495] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/10/24

山本です。

[#27503] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/10/25

山本です。

[#27504] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — "U.Nakamura" <usa@...> 2005/10/25

こんにちは、なかむら(う)です。

[#27505] Re: [ ruby-Bugs-2613 ] building ruby 1.8.3 on Solaris — nobuyoshi nakada <nobuyoshi.nakada@...> 2005/10/25

なかだです。

[#27551] 1.8.4 検証を(だれが|どのように)行うか — "URABE Shyouhei aka.mput" <root@...>

さて、 1.8.4-Preview1

41 messages 2005/10/28
[#27561] Re: 1.8.4 検証を(だれが|どのように)行うか — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/10/30

山本です。

[#27562] Re: 1.8.4 検証を(だれが�匹里茲Δ�)行うか — "URABE Shyouhei aka.mput" <root@...> 2005/10/30

卜部です。

[#27566] Re: 1.8.4 検証を(だれが|どのように)行うか — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2005/10/30

山本です。

[#27586] Re: 1.8.4 検証を(だれが|どのように)行うか — "U.Nakamura" <usa@...> 2005/10/31

こんにちは、なかむら(う)です。

[#27587] Re: 1.8.4 検証を(だれが|どのように)行うか — Yukihiro Matsumoto <matz@...> 2005/10/31

まつもと ゆきひろです

[ruby-dev:27398] Re: warning: 'cdecl' attribute directive ignored

From: Takaaki Tateishi <ttate@...>
Date: 2005-10-06 12:09:03 UTC
List: ruby-dev #27398
Kazuhiro NISHIYAMA wrote:
>>cfunc.c:280: warning: 'cdecl' attribute directive ignored
>>cfunc.c:439: warning: 'stdcall' attribute directive ignored
>>
>>というwarningが大量にでますが、以下のようなパッチでどうでしょうか?
> 
> callback.hの方でもwarningがでていたので、
> そちらも対処してみました。

この件について、cygwinでは現状ではうまくいかなそうなので質問があります。
FUNC_CDECL,FUNC_STDCALL は configure によって生成される config.h 内で
定義され、cygwin/gcc では次の通りです。

#define FUNC_STDCALL(x) x __attribute__ ((stdcall))
#define FUNC_CDECL(x) x __attribute__ ((cdecl))

これはプロトタイプ宣言として、

__attribute__ ((stdcall)) void foo(int i);
void foo(int i) __attribute((stdcall));

のどちらでもcygwinのgccは受け付け、configure ではプロトタイプ宣言しか
チェックしていないので問題となっていません。
しかし、以下のように関数を定義するときには後ろに __attribute__ を付ける
とエラーとなってしまいます。

void foo(int i) __attribute__((stdcall))
{
}

int main(int argc, char *argv[]){
  foo(10);
  exit(0);
}

逆に、次のように関数名の前であればエラーとはなりません。

__attribute__ ((stdcall)) void foo(int i)
{
}

尚、利用しているgccのバージョンは次の通りです。

Reading specs from /usr/lib/gcc/i686-pc-cygwin/3.4.4/specs
Configured with: /gcc/gcc-3.4.4/gcc-3.4.4-1/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-languages=c,ada,c++,d,f77,java,objc --enable-nls --without-included-gettext
--enable-version-specific-runtime-libs --without-x --enable-libgcj --disable-java-awt --with-system-zlib
--enable-interpreter --disable-libgcj-debug --enable-threads=posix --enable-java-gc=boehm --disable-win32-registry
--enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug : (reconfigured)
Thread model: posix
gcc version 3.4.4 (cygming special) (gdc 0.12, using dmd 0.125)

このような状況なのですが、__attribute__ や gcc そのものの使い方が間違っているのか、
FUNC_CDECL,FUNC_STDCALLの用途はプロトタイプ宣言のみを意識しているのか、configureを
直すべきなのかと判断に迷っています。どのようにすべきでしょう?
-- 
Takaaki Tateishi <ttate@ttsky.net>


In This Thread