This might be a very basic question, but I tried to find the answer in SO and couldn't find the exact answer to it.
What's the point of initializing a const pointer with nullptr?
int *const pi = nullptr;
Why does the compiler not emit a warning or error, seeing how pointer pi can't be used effectively anywhere in the program?
I have tried compiling this with g++ -w.
Also, Can you give some use case where a const pointer will get initialized to nullptr for a valid purpose in real code?