https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
Marek Polacek changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
--- Comment #15 from Marek Polacek ---
Author: mpolacek
Date: Mon Aug 29 18:13:13 2016
New Revision: 239833
URL: https://gcc.gnu.org/viewcvs?rev=239833&root=gcc&view=rev
Log:
PR c/77292
* c-common.c (warn_logical_not_parentheses)
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
--- Comment #14 from Manuel López-Ibáñez ---
(In reply to Manuel López-Ibáñez from comment #10)
> > t.c:4:13: warning: logical not is only applied to the left hand side of
> > comparison [-Wlogical-not-parentheses]
> >return !a == (a < b);
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
--- Comment #13 from Segher Boessenkool ---
(In reply to Manuel López-Ibáñez from comment #12)
> (In reply to Segher Boessenkool from comment #11)
> > Both of these suggestions are not so good. "!(a == b)" is better written
> > as "a != b", and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
--- Comment #12 from Manuel López-Ibáñez ---
(In reply to Segher Boessenkool from comment #11)
> Both of these suggestions are not so good. "!(a == b)" is better written
> as "a != b", and "!(a) == b" is just horrible.
Agreed for the former, bu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
Segher Boessenkool changed:
What|Removed |Added
CC||segher at gcc dot gnu.org
--- Comme
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
--- Comment #10 from Manuel López-Ibáñez ---
(In reply to Richard Biener from comment #5)
> int
> foo (int a, int b)
> {
> return !a == (a < b);
> }
>
> t.c: In function ‘foo’:
> t.c:4:13: warning: logical not is only applied to the left hand
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
--- Comment #9 from Manuel López-Ibáñez ---
(In reply to M Welinder from comment #3)
> I am not aware of a rule that requires the compiler to ignore context
> when considering warnings. It certainly does consider context when
> it issues "might
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
--- Comment #8 from Marek Polacek ---
Neither does cc1plus because comparison result has a boolean type...
I'll see what I can do here.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
Richard Biener changed:
What|Removed |Added
Status|SUSPENDED |NEW
Summary|value range prop
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
--- Comment #3 from M Welinder ---
The actual code I got this warning from was...
if (!lower_tail == (p > phalf)) {
where lower_tail is an int and p and phalf are doubles.
That's simply a comparison of two booleans. Note, that
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
Marek Polacek changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77292
Richard Biener changed:
What|Removed |Added
Keywords||diagnostic
--- Comment #1 from Richard
13 matches
Mail list logo