[Bug c/60439] No warning for case overflow in switch statement.

2014-07-28 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c/60439] No warning for case overflow in switch statement.

2014-06-16 Thread mpolacek at gcc dot gnu.org
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

[Bug c/60439] No warning for case overflow in switch statement.

2014-06-11 Thread gary at intrepid dot com
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

[Bug c/60439] No warning for case overflow in switch statement.

2014-06-11 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439 Marek Polacek changed: What|Removed |Added Status|RESOLVED|ASSIGNED Resolution|FIXED

[Bug c/60439] No warning for case overflow in switch statement.

2014-06-11 Thread gary at intrepid dot com
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) {

[Bug c/60439] No warning for case overflow in switch statement.

2014-06-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug c/60439] No warning for case overflow in switch statement.

2014-06-03 Thread mpolacek at gcc dot gnu.org
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

[Bug c/60439] No warning for case overflow in switch statement.

2014-04-17 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439 Marek Polacek changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at

[Bug c/60439] No warning for case overflow in switch statement.

2014-03-13 Thread chengniansun at gmail dot com
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.

[Bug c/60439] No warning for case overflow in switch statement.

2014-03-13 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439 Marek Polacek changed: What|Removed |Added Status|RESOLVED|NEW Last reconfirmed|

[Bug c/60439] No warning for case overflow in switch statement.

2014-03-13 Thread chengniansun at gmail dot com
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

[Bug c/60439] No warning for case overflow in switch statement.

2014-03-13 Thread chengniansun at gmail dot com
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

[Bug c/60439] No warning for case overflow in switch statement.

2014-03-13 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60439 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC|

[Bug c/60439] No warning for case overflow in switch statement.

2014-03-05 Thread pinskia at gcc dot gnu.org
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 .