https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82039
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- Minimal testcase for the front-end bug: template<typename T> void f(void* = 0) { } int main() { f<int>(); } loc.cc: In function 'void f(void*) [with T = int]': loc.cc:4:10: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant] f<int>(); ^ It's not useful to show the call site, since that isn't where the null-pointer-constant is. The first line even says "In function ..." but then the loc.cc:4:10 locus and the caret show a location that isn't in that function at all.