From 1f8780be706f557d840e6c8e8b9188444f11df82 Mon Sep 17 00:00:00 2001 From: CohenArthur Date: Sun, 27 Mar 2022 13:35:03 +0200 Subject: [PATCH] is_match_compatible: Fix warning of uninitialized delim_id variable Since all cases in the switch were handled, this was not really a problem. Still, we should avoid those in case we need to add delimiters at some point Co-authored-by: Thomas Schwinge --- gcc/rust/parse/rust-parse.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/rust/parse/rust-parse.cc b/gcc/rust/parse/rust-parse.cc index b77100a227d..f1e2caa258b 100644 --- a/gcc/rust/parse/rust-parse.cc +++ b/gcc/rust/parse/rust-parse.cc @@ -241,6 +241,9 @@ peculiar_fragment_match_compatible (const AST::MacroMatchFragment &last_match, case AST::CURLY: delim_id = LEFT_CURLY; break; + default: + gcc_unreachable (); + break; } if (contains (allowed_toks, delim_id)) return true;