This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
annoying "case not handled in switch" warnings
- To: gcc-patches at gcc dot gnu dot org
- Subject: annoying "case not handled in switch" warnings
- From: Zack Weinberg <zack at codesourcery dot com>
- Date: Sat, 13 Oct 2001 14:44:56 -0700
recog.c currently spews a huge list of "case value "REG_whatever" not
handled in switch" warnings. This patch corrects the problem, on the
theory that yes we really don't want to copy any other reg notes to
the new insn. This may not be accurate, someone who knows what's
going on should check me.
bootstrapped i686-linux; ok to apply?
zw
* recog.c (peephole2_optimize): Add default case to switch.
===================================================================
Index: recog.c
--- recog.c 2001/10/11 07:07:26 1.127
+++ recog.c 2001/10/13 21:44:17
@@ -3121,6 +3121,8 @@ peephole2_optimize (dump_file)
= gen_rtx_EXPR_LIST (REG_NOTE_KIND (note),
XEXP (note, 0),
REG_NOTES (new_insn));
+ default:
+ /* Discard all other reg notes. */
break;
}