https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168

--- Comment #10 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #9)
> > 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;  ?

We already do:

/home/manuel/test.c:3:21: warning: the address of ‘i’ will always evaluate as
‘true’ [-Waddress]
   int i; bool b = !&i;
                     ^

Reply via email to