https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #12 from Bernd Edlinger ---
Author: edlinger
Date: Mon Sep 19 22:10:11 2016
New Revision: 240251
URL: https://gcc.gnu.org/viewcvs?rev=240251&root=gcc&view=rev
Log:
gcc:
2016-09-19 Bernd Edlinger
PR c++/77434
* doc
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #11 from Bernd Edlinger ---
As I said, I think "<<" on signed integers is generally bogus in a
truth value context.
So I tried an experiment for such a warning:
Index: c-common.c
=
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #10 from Bernd Edlinger ---
(In reply to Manuel López-Ibáñez from comment #9)
> It seems to me that they are two different warnings that could be triggered
> on similar code. The one warned by the patch would also warn about:
>
> if
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #9 from Manuel López-Ibáñez ---
(In reply to Eric Gallager from comment #8)
> As a user, I'd prefer warning about the missing parentheses instead of the
> boolean context thing, the missing parentheses make a lot more sense to me
> an
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
Eric Gallager changed:
What|Removed |Added
CC||egall at gwmail dot gwu.edu
--- Comment
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #7 from Bernd Edlinger ---
(In reply to jos...@codesourcery.com from comment #6)
> On Thu, 1 Sep 2016, bernd.edlinger at hotmail dot de wrote:
>
> > + warning_at (location, 0,
> > + "?: expression using intege
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #6 from joseph at codesourcery dot com ---
On Thu, 1 Sep 2016, bernd.edlinger at hotmail dot de wrote:
> + warning_at (location, 0,
> + "?: expression using integer constants in boolean
> context");
This shou
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #5 from Bernd Edlinger ---
This is an idea for a warning that does not focus on parentheses:
Here we had: a ? c1 : c2;
but in a context where a boolean is requested.
It is always suspicious, when c1, and c2 are integer constants
whic
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
Bernd Edlinger changed:
What|Removed |Added
CC||bernd.edlinger at hotmail dot
de
--- C
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #3 from Marc Glisse ---
(In reply to jos...@codesourcery.com from comment #2)
> following is not suspicious and it would seem silly to warn for it:
>
> return (a > 0 && b <= 3 ? 1 : 2);
>
> (because the suggested alternative parse w
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #2 from joseph at codesourcery dot com ---
On Wed, 31 Aug 2016, joseph at codesourcery dot com wrote:
> > Code such as the following are suspicious:
> >
> > int foo(int a, int b)
> > {
> > return (a > 0 && a <= (b == 1) ? 1 : 2);
>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77434
--- Comment #1 from joseph at codesourcery dot com ---
On Wed, 31 Aug 2016, manu at gcc dot gnu.org wrote:
> Code such as the following are suspicious:
>
> int foo(int a, int b)
> {
> return (a > 0 && a <= (b == 1) ? 1 : 2);
Actually I don't t
13 matches
Mail list logo