原神编译器

· · 个人记录

下面这段代码在 g++ 开 -Wall -Wextra -Wshadow 下不会产生任何 warning:

#include <iostream>
using namespace std;

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int n, s = n; // n is uninitialized

    cin >> n;
    cout << s << endl;

    return 0;
}