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/
*
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
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
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
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
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
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;
}
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
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
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.
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.
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
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
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,
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|
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.
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
17 matches
Mail list logo