------- Comment #6 from aldot at gcc dot gnu dot org 2008-02-02 13:43 -------
Created an attachment (id=15077)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15077&action=view)
Emit warning for surplus case labels in a switch stmt with a boolean condition
The attached patchlet would warn about a superfluous default_label in a
switch_statement that uses a boolean as condition.
It does not burden VRP to emit this warning but checks in c-common.c instead.
gcc/ChangeLog
2008-02-02 Bernhard Fischer <aldot>
* c-common.c (record_surplus_node): New function.
(c_do_switch_warnings): Warn for surplus default label in switch
stmt.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17843