swap.cpp: In function 'void Merge(std::vector<int>&, std::vector<int>&, std::vector<int>&)':
swap.cpp:17:37: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
17 | for (int i = 0, j = 0, l = 1; i < b.size() || j < c.size(); i += l, j += l, l *= 2) {
| ~~^~~~~~~~~~
swap.cpp:17:53: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
17 | for (int i = 0, j = 0, l = 1; i < b.size() || j < c.size(); i += l, j += l, l *= 2) {
| ~~^~~~~~~~~~
swap.cpp:18:46: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
18 | for (int pos = 0; pos < l && i + pos < b.size(); pos ++)
| ~~~~~~~~^~~~~~~~~~
swap.cpp:20:46: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
20 | for (int pos = 0; pos < l && j + pos < c.size(); pos ++)
| ~~~~~~~~^~~~~~~~~~
swap.cpp: In function 'int main()':
swap.cpp:46:42: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
46 | int pos = i >> j / 2 ^ j & 1;
| ~~^~~
swap.cpp:58:42: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses]
58 | int pos = i >> j / 2 ^ j & 1;
| ~~^~~
swap.cpp:30:17: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
30 | freopen (TASKNAME".inp", "r", stdin);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
swap.cpp:31:17: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)' declared with attribute 'warn_unused_result' [-Wunused-result]
31 | freopen (TASKNAME".out", "w", stdout);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~