【初心者歓迎】C/C++室 Ver.48【環境依存OK】at TECH
【初心者歓迎】C/C++室 Ver.48【環境依存OK】 - 暇つぶし2ch472:デフォルトの名無しさん
08/02/11 21:00:10
先に質問したものです。
iccについての質問なのですが、-Wall付きでコンパイルすると沢山警告がでます。
これらの警告は対応すべきなのでしょうか?

$ icc test.cpp -Wall
test.cpp(5): remark #1418: external function definition with no prior declaration
double g(double s) {
^test.cpp(6): remark #383: value copied to temporary, reference to temporary used return std::max(s - 100.0, 0.0);
test.cpp(6): remark #981: operands are evaluated in unspecified order return std::max(s - 100.0, 0.0);

ここで使っているソースはこれです。
#include <iostream>
using namespace std;
double g(double s) {
return std::max(s - 100.0, 0.0);
}

int main()
{
double x = 150.0;
cout << g(x) << endl;
return 0;
}



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch