[Bug c/91432] New: gcc -Wimplicit-fallthrough does not warn when fallthrough to break;

2019-08-13 Thread joe at perches dot com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: joe at perches dot com Target Milestone: --- This code does not emit a fallthrough warning: int foo(int i) { switch (i) { case 1: i = 0; default: break; } return i

[Bug c/80522] New: Enhancement request: __attribute((warn_untested_result))

2017-04-25 Thread joe at perches dot com
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: joe at perches dot com Target Milestone: --- A possibly useful addition similar to: __attribute__((warn_unused_result)) might be __attribute__((warn_untested_result)) for things like

[Bug c/65812] New: gcc 4.9.1 doesn't warn about uninitialized variable use declared in a switch/case statement when compiled with -O

2015-04-20 Thread joe at perches dot com
rsion: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: joe at perches dot com Created attachment 35365 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35365&

[Bug c/65812] gcc 4.9.1 doesn't warn about uninitialized variable use declared in a switch/case statement when compiled with -O

2015-04-20 Thread joe at perches dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65812 --- Comment #3 from Joe Perches --- Thank you both for your very prompt replies. It might be useful to have a -Wunused-eliminated type extra warning though that might be very noisy.

[Bug c/42382] New: _Bool foo &= bar; vs _Bool foo = foo && bar; vs _Bool foo = foo & bar; emitted code different

2009-12-15 Thread joe at perches dot com
nedTo: unassigned at gcc dot gnu dot org ReportedBy: joe at perches dot com GCC build triplet: i486-linux-gnu GCC host triplet: i486-linux-gnu GCC target triplet: i486-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42382

[Bug c/91432] gcc -Wimplicit-fallthrough does not warn when fallthrough to break;

2021-07-27 Thread joe at perches dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91432 --- Comment #7 from Joe Perches --- What could be useful is to add yet another --extra-strict-fallthrough warning flag that would make it possible for these cases to have a warning.