https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
Marek Polacek changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
--- Comment #13 from Marek Polacek ---
Author: mpolacek
Date: Mon Jun 16 12:38:07 2014
New Revision: 211707
URL: https://gcc.gnu.org/viewcvs?rev=211707&root=gcc&view=rev
Log:
PR c/60439
* c.opt (Wswitch-bool): Add Var.
Modified:
tru
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
--- Comment #12 from Gary Funck ---
I submitted Bug #61480 documenting the interaction between Var() and Init().
The test case that I posted is abstracted from actual code. As far as which
switches should be default and/or enabled by -Wall, tha
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
Marek Polacek changed:
What|Removed |Added
Status|RESOLVED|ASSIGNED
Resolution|FIXED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
--- Comment #10 from Gary Funck ---
The following test case when compiled against a recent trunk revision (211365
2014-06-08) generates a warning, as intended by the patch described in comment
8.
int a, x;
int
main ()
{
switch (!x)
{
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
Marek Polacek changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
--- Comment #8 from Marek Polacek ---
Author: mpolacek
Date: Tue Jun 3 17:35:34 2014
New Revision: 211194
URL: http://gcc.gnu.org/viewcvs?rev=211194&root=gcc&view=rev
Log:
PR c/60439
* doc/invoke.texi: Document -Wswitch-bool.
* func
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
Marek Polacek changed:
What|Removed |Added
Status|NEW |ASSIGNED
Assignee|unassigned at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
--- Comment #6 from Chengnian Sun ---
(In reply to Marek Polacek from comment #5)
> OK, reopening, sorry. The "switch condition has boolean value" warning
> might make sense; I'll try to look into it after 4.9.
Thanks for considering it, Marek.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
Marek Polacek changed:
What|Removed |Added
Status|RESOLVED|NEW
Last reconfirmed|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
--- Comment #4 from Chengnian Sun ---
(In reply to Chengnian Sun from comment #3)
> (In reply to Marek Polacek from comment #2)
> > Right. So I think there's nothing much to do. Please reopen if you
> > strongly disagree.
>
> Hi Marek,
>
> Fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
--- Comment #3 from Chengnian Sun ---
(In reply to Marek Polacek from comment #2)
> Right. So I think there's nothing much to do. Please reopen if you
> strongly disagree.
Hi Marek,
>From the perspective of type system, I think no warning is
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
Marek Polacek changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
CC|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439
--- Comment #1 from Andrew Pinski ---
Well in C, the type of a && is an int even though the range is 0...1 .
14 matches
Mail list logo