[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2016-07-21 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 --- Comment #16 from Jason Merrill --- Author: jason Date: Thu Jul 21 06:05:39 2016 New Revision: 238560 URL: https://gcc.gnu.org/viewcvs?rev=238560=gcc=rev Log: PR c++/65168 - -Waddress in unevaluated context. gcc/c-family/ *

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-06-15 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 Manuel López-Ibáñez manu at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|NEW

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-06-15 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 Patrick Palka ppalka at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-06-13 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 --- Comment #13 from Patrick Palka ppalka at gcc dot gnu.org --- Author: ppalka Date: Sat Jun 13 16:11:15 2015 New Revision: 224455 URL: https://gcc.gnu.org/viewcvs?rev=224455root=gccview=rev Log: Emit -Waddress warnings for comparing address of

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-23 Thread paolo.carlini at oracle dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|NEW |ASSIGNED

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 --- Comment #3 from Manuel López-Ibáñez manu at gcc dot gnu.org --- I got confused by Clang's message. The problem is not the pointer or NULL. The problem is converting the address of a reference to bool: int fii(int *p) { int r=*p; return

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 --- Comment #4 from Manuel López-Ibáñez manu at gcc dot gnu.org --- Or even: int fii(int p) { int r=p; return !r; }

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread jan.kratochvil at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 --- Comment #5 from Jan Kratochvil jan.kratochvil at redhat dot com --- (In reply to Manuel López-Ibáñez from comment #3) Does this patch work in your real-world code? There were just many tests like: if (!r) return 0; So it should really

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 Manuel López-Ibáñez manu at gcc dot gnu.org changed: What|Removed |Added Keywords||patch

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread jan.kratochvil at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 --- Comment #2 from Jan Kratochvil jan.kratochvil at redhat dot com --- It should check the '!r' condition which makes no sense. The variable initialization in real world programs is too complicated to be able to figure out it may be NULL.

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 --- Comment #8 from Manuel López-Ibáñez manu at gcc dot gnu.org --- (In reply to Jonathan Wakely from comment #7) The diagnostic needs rewording, r is not the address of a reference, it's the address of whatever the reference is bound to.

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 --- Comment #7 from Jonathan Wakely redi at gcc dot gnu.org --- The diagnostic needs rewording, r is not the address of a reference, it's the address of whatever the reference is bound to. Please don't add diagnostics that talk about something

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread redi at gcc dot gnu.org
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

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread manu at gcc dot gnu.org
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,

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 Manuel López-Ibáñez manu at gcc dot gnu.org changed: What|Removed |Added Target|x86_64-linux-gnu|

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 --- Comment #11 from Jonathan Wakely redi at gcc dot gnu.org --- Great, then my suggestion would be to use exactly the same wording for references.

[Bug c++/65168] diagnostic: missing: reference cannot be bound to dereferenced null pointer

2015-03-22 Thread manu at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65168 --- Comment #12 from Manuel López-Ibáñez manu at gcc dot gnu.org --- (In reply to Jonathan Wakely from comment #11) Great, then my suggestion would be to use exactly the same wording for references. I guess the Clang devs added their wording