The following code is incorrectly accepted by GCC: int main(){ void*p=int(0); } This code is invalid because int(0) is not a null pointer constant. Clang and MSVC (with /permissive-) reject this program for this reason. Also, GCC rejects this as a null pointer constant in some other contexts, for example: #include<iostream> void foo(void*){ std::cout<<"1\n"; } void foo(...){ std::cout<<"2\n"; } int main(){ foo(0); foo(int(0)); } GCC prints "1 2" here (correctly) since int(0) isn't treated as a null pointer constant. Though not all other contexts handle this correctly, for example static_cast<void*>(int(0)) is also incorrect accepted.
Dup, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52145#c11 for the full list; int(0) here is the same as `int{}` and `(int)0`. *** This bug has been marked as a duplicate of bug 52145 ***