C1024 (W) Out of float

Renesas SuperH RISC engine Standard 9.4.2.0を使用しています。

ビルド時にOut of floatというWarningが大量に出て困っています。

どこかで、このWarningは消せないと書いてあった気がするのですが、その記述も見つけられません。

どうしたらWarningを消せるでしょうか?

Parents
  • float d10 = 1234567890.0f;
    float d11 = 12345678901.0f;
    float d12 = 123456789012.0f;
    float d13 = 1234567890123.0f;
    float d14 = 12345678901234.0f;
    float d15 = 123456789012345.0f;
    float d16 = 1234567890123456.0f;
    float d17 = 12345678901234567.0f;
    float d18 = 123456789012345678.0f;
    float d19 = 1234567890123456789.0f;
    float d20 = 12345678901234567890.0f;
    

    float の値が IEEE 754 の倍精度で表現できる精度の範囲を超えるとその警告が出るようですが

    test.c(8) :  C1024 (W) Out of float
    test.c(9) :  C1024 (W) Out of float
    test.c(10) :  C1024 (W) Out of float
    test.c(11) :  C1024 (W) Out of float
    

    SH-C に警告抑止のコマンドラインオプションがあると思うのでそれが使えないでしょうか? あるいは、ソースの書き方を見直すのも解決方法だと思います。

Reply
  • float d10 = 1234567890.0f;
    float d11 = 12345678901.0f;
    float d12 = 123456789012.0f;
    float d13 = 1234567890123.0f;
    float d14 = 12345678901234.0f;
    float d15 = 123456789012345.0f;
    float d16 = 1234567890123456.0f;
    float d17 = 12345678901234567.0f;
    float d18 = 123456789012345678.0f;
    float d19 = 1234567890123456789.0f;
    float d20 = 12345678901234567890.0f;
    

    float の値が IEEE 754 の倍精度で表現できる精度の範囲を超えるとその警告が出るようですが

    test.c(8) :  C1024 (W) Out of float
    test.c(9) :  C1024 (W) Out of float
    test.c(10) :  C1024 (W) Out of float
    test.c(11) :  C1024 (W) Out of float
    

    SH-C に警告抑止のコマンドラインオプションがあると思うのでそれが使えないでしょうか? あるいは、ソースの書き方を見直すのも解決方法だと思います。

Children
No Data