Consider this piece of code:
#include <iostream>
#include <vector>
#include <cstdint>
int main() {
std::vector<int> a{ 10, 11, 12, 13, 14, 15 };
for (int32_t i = 0; i < a.size(); i++)
std::cout << i << " ";
}
i < a.size() should trigger a "signed/unsigned mismatch" warning, at least if the appropriate warning switches are set.
gcc (with -Wall) and clang (with -Wall -Wextra) both trigger the warning with and without the -m32 switch.
The Microsoft x32 also compiler triggers the warning but the Microsoft x64 compiler doesn't trigger the warning.
You can try here: https://www.godbolt.org/z/x74Mzdh4Y
Is this a bug in the Microsoft x64 compiler?