Mamoru Tasaka
mtasa****@ioa*****
2008年 2月 22日 (金) 15:07:25 JST
田坂です Hiroyuki Ikezoe wrote, at 02/22/2008 02:23 PM +9:00: >>> nsIHelperAppLauncherDialog::Show()が >>> >>> Show(nsIHelperAppLauncher *aLauncher, nsISupports *aContext, PRUint32 >>> aReason) >>> >>> こうなってるのに、 >>> >>> | nsIHelperAppLauncherDialog *p; >>> | p->Show (nsnull, nsnull, -1); >>> >>> このコードが正常にコンパイル通っちゃってます。 > > こっちが32ビットの話でした。 これは分かりました。g++の場合-Wconversionではなく-Wsign-conversionで ないといけないようです。 ------------------------------------------------------------------------------------------ -Wconversion Warn for implicit conversions that may alter a value. This includes conversions between real and integer, like "abs (x)" when "x" is "double"; conversions between signed and unsigned, like "unsigned ui = -1"; and conversions to smaller types, like "sqrtf (M_PI)". Do not warn for explicit casts like "abs ((int) x)" and "ui = (unsigned) -1", or if the value is not changed by the conversion like in "abs (2.0)". Warnings about conversions between signed and unsigned integers can be disabled by using -Wno-sign-conversion. For C++, also warn for conversions between "NULL" and non-pointer types; confusing overload resolution for user-defined con- versions; and conversions that will never use a type conversion operator: conversions to "void", the same type, a base class or a reference to them. Warnings about conversions between signed and unsigned integers are disabled by default in C++ unless -Wsign-conversion is explicitly enabled. ---------------------------------------------------------------------------------------- gcc43から変わったのかもしれません。