diff options
Diffstat (limited to 'gcc/ada/s-wchcnv.adb')
-rw-r--r-- | gcc/ada/s-wchcnv.adb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/gcc/ada/s-wchcnv.adb b/gcc/ada/s-wchcnv.adb index b58290f..3e877aa 100644 --- a/gcc/ada/s-wchcnv.adb +++ b/gcc/ada/s-wchcnv.adb @@ -47,7 +47,7 @@ package body System.WCh_Cnv is function Char_Sequence_To_UTF_32 (C : Character; - EM : WC_Encoding_Method) return UTF_32_Code + EM : System.WCh_Con.WC_Encoding_Method) return UTF_32_Code is B1 : Unsigned_32; C1 : Character; @@ -94,7 +94,7 @@ package body System.WCh_Cnv is raise Constraint_Error; end if; - W := Shift_Left (W, 6) or (U and 2#00111111#); + W := Shift_Left (W, 6) or (U and 2#00111111#); end Get_UTF_Byte; -- Start of processing for Char_Sequence_To_Wide @@ -151,15 +151,8 @@ package body System.WCh_Cnv is -- 16#00_0080#-16#00_07FF#: 110xxxxx 10xxxxxx elsif (U and 2#11100000#) = 2#110_00000# then - W := Shift_Left (U and 2#00011111#, 6); - U := Unsigned_32 (Character'Pos (In_Char)); - - if (U and 2#11000000#) /= 2#10_000000# then - raise Constraint_Error; - end if; - - W := W or (U and 2#00111111#); - + W := U and 2#00011111#; + Get_UTF_Byte; return UTF_32_Code (W); -- 16#00_0800#-16#00_ffff#: 1110xxxx 10xxxxxx 10xxxxxx @@ -210,7 +203,6 @@ package body System.WCh_Cnv is end if; when WCEM_Brackets => - if C /= '[' then return Character'Pos (C); end if; |