Skip to content

Commit 1f8780b

Browse files
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 <[email protected]>
1 parent 5a15694 commit 1f8780b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

gcc/rust/parse/rust-parse.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,9 @@ peculiar_fragment_match_compatible (const AST::MacroMatchFragment &last_match,
241241
case AST::CURLY:
242242
delim_id = LEFT_CURLY;
243243
break;
244+
default:
245+
gcc_unreachable ();
246+
break;
244247
}
245248
if (contains (allowed_toks, delim_id))
246249
return true;

0 commit comments

Comments
 (0)