aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/csets.adb
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
committerIan Lance Taylor <iant@golang.org>2021-09-13 10:37:49 -0700
commite252b51ccde010cbd2a146485d8045103cd99533 (patch)
treee060f101cdc32bf5e520de8e5275db9d4236b74c /gcc/ada/csets.adb
parentf10c7c4596dda99d2ee872c995ae4aeda65adbdf (diff)
parent104c05c5284b7822d770ee51a7d91946c7e56d50 (diff)
downloadgcc-e252b51ccde010cbd2a146485d8045103cd99533.zip
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.gz
gcc-e252b51ccde010cbd2a146485d8045103cd99533.tar.bz2
Merge from trunk revision 104c05c5284b7822d770ee51a7d91946c7e56d50.
Diffstat (limited to 'gcc/ada/csets.adb')
-rw-r--r--gcc/ada/csets.adb50
1 files changed, 26 insertions, 24 deletions
diff --git a/gcc/ada/csets.adb b/gcc/ada/csets.adb
index 0b77b65..29a1592 100644
--- a/gcc/ada/csets.adb
+++ b/gcc/ada/csets.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2020, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2021, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -1091,38 +1091,40 @@ package body Csets is
begin
-- Set Fold_Upper table from source code indication
- if Identifier_Character_Set = '1'
- or else Identifier_Character_Set = 'w'
- then
- Fold_Upper := Fold_Latin_1;
+ case Identifier_Character_Set is
+ when '1' | 'w' =>
+ Fold_Upper := Fold_Latin_1;
- elsif Identifier_Character_Set = '2' then
- Fold_Upper := Fold_Latin_2;
+ when '2' =>
+ Fold_Upper := Fold_Latin_2;
- elsif Identifier_Character_Set = '3' then
- Fold_Upper := Fold_Latin_3;
+ when '3' =>
+ Fold_Upper := Fold_Latin_3;
- elsif Identifier_Character_Set = '4' then
- Fold_Upper := Fold_Latin_4;
+ when '4' =>
+ Fold_Upper := Fold_Latin_4;
- elsif Identifier_Character_Set = '5' then
- Fold_Upper := Fold_Cyrillic;
+ when '5' =>
+ Fold_Upper := Fold_Cyrillic;
- elsif Identifier_Character_Set = 'p' then
- Fold_Upper := Fold_IBM_PC_437;
+ when '9' =>
+ Fold_Upper := Fold_Latin_9;
- elsif Identifier_Character_Set = '8' then
- Fold_Upper := Fold_IBM_PC_850;
+ when 'p' =>
+ Fold_Upper := Fold_IBM_PC_437;
- elsif Identifier_Character_Set = '9' then
- Fold_Upper := Fold_Latin_9;
+ when '8' =>
+ Fold_Upper := Fold_IBM_PC_850;
- elsif Identifier_Character_Set = 'f' then
- Fold_Upper := Fold_Full_Upper_Half;
+ when 'f' =>
+ Fold_Upper := Fold_Full_Upper_Half;
- else -- Identifier_Character_Set = 'n'
- Fold_Upper := Fold_No_Upper_Half;
- end if;
+ when 'n' =>
+ Fold_Upper := Fold_No_Upper_Half;
+
+ when others =>
+ raise Program_Error;
+ end case;
-- Use Fold_Upper table to compute Fold_Lower table