https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Manuel López-Ibáñez from comment #8) > Sure, I was trying to make the Clang message a bit more understandable. I > got completely confused by "pointer may be assumed to always convert to > true" when there is no pointer (in my last testcase). &r is a pointer. > What about "the address of the object bound to 'r' may be assumed to always > convert to true"? Why only warn about references, and not also for int i; bool b = !&i; ? > I'm not sure if we can tell that 'r' is bounded to a dereferenced pointer at > the point of warning. If so, then it could print "because in C++ a reference > cannot be bound to a dereferenced null pointer", but this seems less > important. That would be worse IMHO.