我使用以下命令编译下面的代码:
g++ -ansi -pedantic -Wall -Wextra myfile.cpp
我希望能够收到一个警告,提示 int64_t 被转换成 int。但是却没有任何警告信息。我该如何实现这个目标?
我的 g++ 版本为 4.6.1。
//file:myfile.cpp
#include <iostream>
using namespace std;
int main()
{
int64_t yy = 10;
int size = yy;
cout << size << endl;
}
int32_t size = yy;
? - Paul R