Our project uses C ++ 11/14, and we want to use nullptr instead of 0 or NULL with pointers, even if 0 (as an integer literal) is allowed.
I have the following code:
int main() { int *ptr1 = nullptr;
If I compile GCC (5.3.0) and the -Wzero-as-null-pointer-constant flag, these are warnings in #2 , but I cannot find a similar flag in Clang. If I compile the code using Clang (3.7.1) and the -Weverything flag, I do not receive a warning about #2 .
So, is there a way to get a similar warning for this in Clang?
source share