diff options
author | CohenArthur <arthur.cohen@epita.fr> | 2022-03-27 13:35:03 +0200 |
---|---|---|
committer | CohenArthur <arthur.cohen@epita.fr> | 2022-03-27 14:46:40 +0200 |
commit | 1f8780be706f557d840e6c8e8b9188444f11df82 (patch) | |
tree | 147f79fa62619ded8d78ba2b100211be712982f3 /gcc | |
parent | 5a15694ee22500458a17f064b42fc7b8051984db (diff) | |
download | gcc-1f8780be706f557d840e6c8e8b9188444f11df82.zip gcc-1f8780be706f557d840e6c8e8b9188444f11df82.tar.gz gcc-1f8780be706f557d840e6c8e8b9188444f11df82.tar.bz2 |
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 <thomas@schwinge.name>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/parse/rust-parse.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/parse/rust-parse.cc b/gcc/rust/parse/rust-parse.cc index b77100a..f1e2caa 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; |